cancel
Showing results for 
Search instead for 
Did you mean: 

Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/vendo

Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/vendo

I just unzipped a new template in a new M2 installation and after trying to upgrade with 

php bin/magento setup:upgrade  the upgrade stops with this warning 

 

Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/vendor/zendframework/zend-code/src/Reflection/ParameterReflection.php on line 84

 

I am in a AWS ec2 installation.  

 

How can I fix this I find nothing online

 

6 REPLIES 6

Re: Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/v

Hello @starlyns 

 

Are you using php version 7.4?
Magento 2 is not compatible with PHP 7.4, try lowering the php version.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/v

@starlyns you can try the soltution as suggested by @theMageComp.

 

If that doesn't work then go to the above mention line no. and Use getName() instead __toString() .

 

Thanks

 

 

Re: Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/v

Magento was working fine after the installation. I completed the installation and 

I just happened to unzip a template and after that, I started getting that error. 

 

 

Re: Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/v

@starlyns please let me know your current version of php?

Re: Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/v

Hello @starlyns ,

I had the same issue.

This is PHP Version issue 

you can refer below the solution for this, it worked for me

 

https://community.magento.com/t5/Magento-2-x-Programming/Magento-2-Deprecated-Functionality-Function...

 

https://magento.stackexchange.com/a/316044/72475

 

Hope it works for you as well Smiley Happy

Thanks. 

 

Re: Deprecated Functionality: Function ReflectionType::__toString() is deprecated in /var/www/html/v

Please assist me in implementing the process of connecting a live server link to Command Prompt and using the code below.

 

I'm new to Magento. I've worked on a local server before, but I'm not sure how to work with Command Prompt on a live server, so please assist me.

 


php bin
/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush chmo -R 0777 var/ pub/ generated/
Spoiler