cancel
Showing results for 
Search instead for 
Did you mean: 

Laminas compile error at update to 2.4.3

Laminas compile error at update to 2.4.3

Hi all,

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?

16 REPLIES 16

Re: Laminas compile error at update to 2.4.3

@VIANEL 

Please follow this solution:

https://meetanshi.com/blog/solved-laminas-compile-error-at-update-to-magento-2-4-3/

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Laminas compile error at update to 2.4.3

I am having the exact same issue here when running setup:di:compile but none solutions worked for me.

I do not find a match, when looking for "Laminas\Hydrator\Reflection" in app or vendor directory.

So for now I am not able to update to 2.4.3

Re: Laminas compile error at update to 2.4.3

@arumcomputer 

There might be laminas in the code

Please provide a screenshot of the error

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Laminas compile error at update to 2.4.3

This is the error message, that is shown in the CLI.

[cid:image001.png@01D7942A.AF0B4E50]

Re: Laminas compile error at update to 2.4.3

It seems like image upload is not working as expeced:

 

In ErrorHandler.php line 61:
                                                                                                                                                                  
  User Deprecated Functionality: Class Laminas\Hydrator\Reflection is deprecated, please use Laminas\Hydrator\ReflectionHydrator instead in /var/www/magento2/de  
  v/vendor/laminas/laminas-hydrator/src/Reflection.php on line 17    

Re: Laminas compile error at update to 2.4.3

@arumcomputer 

Magento 2.4.3 does not contain laminas/laminas-hydrator class

 

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Laminas compile error at update to 2.4.3

@Sanjay JethvaI cannot confirm that. The directory is present even if i delete vendor and do a fresh composer install:

 

/var/www/magento2/dev/vendor/laminas$ ls -la
total 136
drwxr-xr-x  34 www-data www-data 4096 Aug 18 09:10 .
drwxr-xr-x 108 www-data www-data 4096 Aug 18 09:10 ..
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-captcha
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-code
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-config
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-crypt
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:09 laminas-db
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:08 laminas-dependency-plugin
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:10 laminas-di
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-escaper
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-eventmanager
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:10 laminas-feed
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:10 laminas-filter
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:08 laminas-http
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-hydrator
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:10 laminas-i18n
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-json
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-loader
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-mail
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-math
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-mime
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-modulemanager
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-mvc
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-router
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:10 laminas-server
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:08 laminas-servicemanager
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:09 laminas-session
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:10 laminas-soap
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-stdlib
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:10 laminas-text
drwxr-xr-x   3 www-data www-data 4096 Aug 18 09:08 laminas-uri
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:08 laminas-validator
drwxr-xr-x   4 www-data www-data 4096 Aug 18 09:08 laminas-view
drwxr-xr-x   5 www-data www-data 4096 Aug 18 09:08 laminas-zendframework-bridge

And i cannot see a composer requirement for "laminas-hydrator".

Re: Laminas compile error at update to 2.4.3

Could be dhl/module-carrier-paket for me causing that dependency, right?

 

composer depends --tree laminas/laminas-hydrator
laminas/laminas-hydrator 4.2.2 Serialize objects to arrays, and vice versa
├──laminas/laminas-hydrator 4.2.2 (replaces zendframework/zend-hydrator ^3.0.2)
│  ├──dhl/module-carrier-paket 2.0.1 (requires zendframework/zend-hydrator ^1.1 || ^2.1 || ^3.0)
│  │  ├──deutschepost/module-internetmarke 2.0.1 (requires dhl/module-carrier-paket ^2.0.1)
│  │  │  └──dhl/shipping-m2 2.0.1 (requires deutschepost/module-internetmarke ~2.0.1)
│  │  │     └──magento/project-community-edition 2.3.5-p2 (requires dhl/shipping-m2 *)
│  │  └──dhl/shipping-m2 2.0.1 (requires dhl/module-carrier-paket ~2.0.1)
│  │     └──magento/project-community-edition 2.3.5-p2 (requires dhl/shipping-m2 *)
│  └──laminas/laminas-hydrator 4.2.2 (replaces zendframework/zend-hydrator ^3.0.2) (circular dependency aborted here)
└──laminas/laminas-hydrator 4.2.2 (replaces zendframework/zend-hydrator ^3.0.2) (circular dependency aborted here)

Re: Laminas compile error at update to 2.4.3