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

Magento 2.3 is not compatible with Php 7.4, So there are two possible solutions:

1. Downgrade you Php version to 7.3 – Recommended
2. If it is not possible for you to downgrade php version, you need to perform few changes in core files. This is a work around until Magento get compatible version for Php 7.4. When installing on my end I had faced few issues, this is what I did to solve them.

File: vendor/zendframework/zend-code/src/Reflection/ParameterReflection.php
In function `detectType()` replace line

return (string) $type;


return $type->getName();

Reference -https://community.magento.com/t5/Magento-2-x-Programming/Magento-2-Deprecated-Functionality-Function-ReflectionType/m-p/451204/highlight/true#M11021

Leave a Reply

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

You May Also Like