dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 64 forks source link

Use laminas library instead of zend #598

Closed piotrmatras closed 1 year ago

piotrmatras commented 1 year ago

Hello, I have noticed a problem while running cronjob: ddg_automation_subscriber_sync Class Zend\Uri\Http doesn't exist. I think we should use Laminas\Uri\Http instead.

Magento 2.4.5 PHP8.1 Screenshot 2022-12-20 at 14 18 35

sta1r commented 1 year ago

@piotrmatras In general yes, we need to do this, but we still currently support Magento versions lower than 2.3.5 (when the Zend > Laminas transition happened). All Zend classes should be automatically replaced with Laminas classes during compilation, however. See https://community.magento.com/t5/Magento-DevBlog/Migration-of-Zend-Framework-to-the-Laminas-Project/ba-p/443251.

Also, you look like you are running Catalog sync, not Subscriber sync.

piotrmatras commented 1 year ago

@sta1r thanks for replying. Unfortunately, it doesn't work. I have whitelisted laminas/laminas-dependency-plugin in my composer.json. This issue occurs while the Subscriber sync is running. Do you have a plan to fix it somehow?

sta1r commented 1 year ago

@piotrmatras Do you have steps to reproduce? What version of the connector are you running?

If you see this screenshot, in UrlFinder Magento has replaced the Zend class with the matching Laminas one.

Screenshot 2022-12-20 at 17 13 46
piotrmatras commented 1 year ago

@sta1r yes, you're right. This issue occurs only if you want to run cronjob manually using magerun. eg. magerun sys:cron:run ddg_automation_subscriber_sync