0

I was updating Magento Community from 2.4.2 to 2.4.3 and get this error at compile on 55%:

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

Any suggustions on this?

  • PHP: 7.4.22
  • Composer: 2.1.5

PS: Installing with Composer version 1 end up with the same error.

4
  • 1
    Magento 2 does not support php5.4. If you have that version of PHP you should update it. Aug 16, 2021 at 8:25
  • 1
    Got PHP 7.4 on Server, not 5.4 have edited it later. Aug 18, 2021 at 13:17
  • @Alisinasyon show us the full output of the error. It will point to the file that is using that depreciated class. Aug 23, 2021 at 20:00
  • magento.stackexchange.com/questions/344597/… check here
    – akashmalik
    Oct 19, 2021 at 6:32

1 Answer 1

0

The reason is that laminas/laminas-hydrator has been removed from 2.4.3. It was there in 2.4.2.

  1. Upgrade the PHP version to 7.4
  2. composer require laminas/laminas-hydrator -vvv then execute compile commands again.

https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-3.html#platform-enhancements

3
  • Still get same error: Compilation was started. Area configuration aggregation... 5/9 [===============>------------] 55% 1 min 380.0 MiB In ErrorHandler.php line 61: User Deprecated Functionality: Class Laminas\Hydrator\Reflection is deprecated, please use Laminas\Hydrator\ReflectionHydrator instead in /var/www/clients/client1/web8/web/vendor/laminas/laminas-hydrator/src/Reflection.php on line 1 7 setup:di:compile Aug 16, 2021 at 9:49
  • 1
    can you see folder laminas-hydrator in vendor/laminas?
    – sandip
    Aug 16, 2021 at 10:26
  • Yes, there is the direcotry Aug 16, 2021 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.