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!

Share Post

CodeDecorator

We are a prominent worldwide provider of Magento Extensions and a pioneer in web development solutions.

Leave a Reply

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