When I try to execute bin/Magento setup:install from command line I get an exception as "Deprecated Functionality: Function ReflectionType::__toString() is deprecated".
It gives the same error for my previous Magento instance when I do
bin/magento setup:upgrade.
It was running all good a few days earlier.
Any solution for this?
Note: I am using PHP 7.4 on my machine and installed Magento 2.3
Thank You
Best Answer
Magento 2.3 is not compatible with Php 7.4, So there are two possible solutions:
Change 1:
In function
detectType()
replace linereturn (string) $type;
withreturn $type->getName();
Change 2:
In function
__toString()
replace line$sql = implode($parts, $this->type);
with$sql = implode($this->type,$parts);
Change 3:
In function
getCodeByFrontName()
replace lineif ($areaInfo['frontName'] == $frontName)
withif (isset($areaInfo) && $areaInfo['frontName'] == $frontName)
Hope you will find it helpfull.
Thanks