cancel
Showing results for 
Search instead for 
Did you mean: 

Deprecated: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\magento\vendor\m

Deprecated: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\magento\vendor\m

Deprecated: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\magento\vendor\magento\framework\Code\Reader\ClassReader.php on line 34

 

Can anyone please suggest a solution?

 

I am using PHP version 8.0.6 & Magento 2.4.1

2 REPLIES 2

Re: Deprecated: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\magento\vend

Hello @nabhanmoht9b57,

Greetings to you!

As per Magento documentation, Magento 2.4 does not support PHP v8. You can try changing the version from PHP 8.0.6 to PHP 7.3. 

Because Magento 2.4 is compatible with PHP 7.3.

 

I hope this will help you to resolve your issue.

If not, feel free to contact us.

 

Solved? Click KUDOS and accept as a solution.

Thank you!

Re: Deprecated: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\magento\vend

Hi

You should use PHP 7.4 for Magento 2.4.1 
You can check the requirements here: https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html

getClass() method is deprecated in PHP 8 thats why it is showing you error. You need to install PHP 7.4 for Magento 2.4.1 

Thanks