Was trying to update M 2.3.2 (PHP 7,2) to M2.4.6 (PHP 8,2)
And got this error
Class "Pelago\Emogrifier" does not exist
Class Company\Module\Model\Template\Filter\Interceptor generation error: The requested class did not generate p
roperly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' C
LI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then
you must add the generated class object to the signature of the related construct method, only.
This is the only module that kinda screws up the di:compile but on M 2.3.2 (PHP 7,2) everything runs smoothly
Already added permission(s), removed generated folder upgraded Pelago/emogrifier versions, made comparisons, also removed line breaks on the di.xml and ran with code sniffer as well
vendor/bin/phpcs --standard=Magento2 ..... app/code/Company/module
also removed line breaks on di.xml as suggested by https://github.com/magento/magento2/issues/32296
I also posted same issue on https://community.magento.com/t5/Installing-Magento-2-x/Permissions-error-in-2-3/td-p/123680 but I think this will get more attention as separate concern/topic. Thanks!
1)works fine M 2.3.2 (PHP 7,2)
"require": {
"pelago/emogrifier": "^2.0.0",
"php": "~7.1.3||~7.2.0",
2)Gives that generation class error on M2.4.6 (PHP 8,2)
"pelago/emogrifier": "^7.0",
"php": "~8.1.0||~8.2.0",
Class "Pelago\Emogrifier" does not exist
Class Company\Module\Model\Template\Filter\Interceptor generation error: The requested class did not generate p
roperly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' C
LI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then
you must add the generated class object to the signature of the related construct method, only.