Magento 2.4.3 version is released on August 10, 2021.
The latest Magento 2 version is equipped with features to improve the performance and security of the Magento 2 store. Moreover, the Magento 2.4.3 release facilitates the open-source users with Page Builder functionality too!
Such feature-rich Magento 2 version releases prompted the Magento developers to download Magento 2.4.3 and upgrade the stores immediately.
If you are one of those eager Magento enthusiasts, you might have faced the laminas compile error at an update to Magento 2.4.3.
Do not worry if you faced such as error:
Deprecated Functionality: Class LaminasHydratorReflection is deprecated, please use LaminasHydratorReflectionHydrator instead in /pathToMagento/web/vendor/laminas/laminas-hydrator/src/Reflection.php on line 17
You can follow the below solution and smoothly leverage the features of the latest Magento 2 version!
The Solution to Laminas Compile Error at Update to Magento 2.4.3:
Case 1: If you have successfully upgraded the store to Magento 2.4.3, and then witnessed a compile error:
In this case, the laminas class might be used in some of the extensions. You need to update the code of these extensions.
To find which extensions are using the laminas class, run the below command:
grep -r 'class to search' app/
Case 2: If you have not upgraded to Magento 2.4.3 already:
In the composer.json file, open the Magento 2.4.3’s composer.json file. In that, copy the class of require-dev and place them in your Magento

That’s it.
Now, you must have resolved laminas compile error at update to 2.4.3 version of Magento 2 already!
Or, you may opt for the Magento 2 Upgrade service to avoid handling any such errors and smoothly run your store on the latest version.
Do share the solution with the Magento community via social media.
Thank you.