Deprecated Functionality: Class Laminas\Hydrator\Reflection is deprecated, please use Laminas\Hydrator\ReflectionHydrator instead in /pathToMagento/web/vendor/laminas/laminas-hydrator/src/Reflection.php on line 17

This is a common error while upgrading Magento 2.x To Magento 2.4.3

Deprecated Functionality: Class Laminas\Hydrator\Reflection is deprecated, please use Laminas\Hydrator\ReflectionHydrator instead in /pathToMagento/web/vendor/laminas/laminas-hydrator/src/Reflection.php on line 17

The following below solution

Solution [1] – After Upgrade Magento 2.x To Magento 2.4.3

Once you successfully upgraded Magento 2.x To Magento 2.4.3 and issue occurs as above-mentioned.

The laminas class might be used in some of the extensions, need to update the specific code of these extensions.

Using below command we can find which extensions, using laminas class.

grep -r 'class to search' app/

Solution [2] – Before Upgrade Magento 2.x To Magento 2.4.3

Copy below code from Magento 2.4.3 & Paste in Magento 2.x

"require-dev": {
   "allure-framework/allure-phpunit": "~1.2.0",
   "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
   "friendsofphp/php-cs-fixer": "~2.16.0",
   "lusitanian/oauth": "~0.8.10",
   "magento/magento-coding-standard": "*",
   "magento/magento2-functional-testing-framework": "^3.0",
   "pdepend/pdepend": "~2.7.1",
   "phpcompatibility/php-compatibility": "^9.3",
   "phpmd/phpmd": "^2.8.0",
   "phpstan/phpstan": ">=0.12.3 <=0.12.23",
   "phpunit/phpunit": "^9",
   "sebastian/phpcpd": "~5.0.0",
   "squizlabs/php_codesniffer": "~3.5.4"
    },

After paste above code in Magento 2.x, start upgrade process.

Other important Magento 2.4.x issue as below

Magento 2.3 To Magento 2.4.5 Comptibility For PHP, MYSQL, Composer, Apache etc


Magento 2.4.3-p1 Installation Steps


Magento 2.4.3 Installation Steps


Magento 2.4.3 Features


Magento 2.4.3 – p1 Features


Magento 2.4 Two Factor Authentication


Magento 2.4.1 Features


Magento 2.4 Features


Magento 2.4 Installation


Magento 2.2, Magento 2.3, Magento2.4 Installation Issue on Windows 10, XAMPP


Magento 2 Installation at 51% Error: (Wrong file in Gd2.php:64) Module ‘Magento_Theme’

Leave a Reply

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