Press ESC to close

Magento 2 : Deprecated Functionality: Function ReflectionType::__toString() is deprecated

If you are stuck with above problem, we have solution for you which mentioned below.

File: vendor/zendframework/zend-code/src/Reflection/ParameterReflection.php
OR
File: vendor/laminas/laminas-code/src/Reflection/ParameterReflection.php

In function detectType() replace line return (string) $type; with return $type->getName();
File: vendor/magento/framework/DB/Sql/UnionExpression.php

In function __toString() replace line $sql = implode($parts, $this->type); with $sql = implode($this->type,$parts);
File: vendor/magento/framework/App/AreaList.php

In function getCodeByFrontName() replace line if ($areaInfo['frontName'] == $frontName) with if (isset($areaInfo) && $areaInfo['frontName'] == $frontName)

I hope this solution help you out and let’s know if you have any doubt or any other solution which worked for you.

Happy Coding!

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

jhjbhjbhjbhjjjhbj

Share Post

Leave a Reply

Your email address will not be published. Required fields are marked *