paynl / magento2-plugin

The Pay. plugin for Magento 2
https://www.pay.nl
28 stars 32 forks source link

Composer 2.0 compatibility #127

Closed Tjitse-E closed 3 years ago

Tjitse-E commented 3 years ago

Deprecation Notice: Class Paynl\Payment\Controller\CsrfAwareActionInterface located in ./vendor/paynl/magento2-plugin/Controller/CsrfInterface22.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201

I noticed this message when running composer dump-autoload --optimize for one of our projects. Magento 2.4.2 is already compatible with composer 2.0, so it makes sense to fix autoloading in this module.

woutse commented 3 years ago

Thanks for your message. We'll look into it!

Tjitse-E commented 3 years ago

@woutse great, can't we leave the issue open until this is fixed?

hostep commented 3 years ago

Also noticing the same problem over here. @woutse, this issue should remain open until fixed, right?

It's probably time you start dropping Magento < 2.3 support? Or maybe figure out a better solution then this hack.

woutse commented 3 years ago

Thank for your message. We are working on this!

woutse commented 3 years ago

ready wednesday

woutse commented 3 years ago

This problem should now be solved with the latest release 2.0.0. Can you confirm? Thanks!

hostep commented 3 years ago

Thanks @woutse: I can confirm that the autoload warnings are gone using version 2.0.0 of your module! 🙂

However, I'd advise you to change the constraints in the composer.json file a bit, since currently you can still install version 2.0.0 on Magento 2.2 using composer I think, I would suggest something like this which should allow Magento 2.3.0 until 2.4.x:

    "magento/module-sales": "^102.0.0 || ^103.0.0",
    "magento/module-payment": "^100.3.0",
    "magento/module-quote": "^101.1.0",
woutse commented 3 years ago

Good to hear! Good point. We'll dig into this as well. I'll keep you informed here.

woutse commented 3 years ago

We investigated this. Changes will be made and available in the next release!

hans2103 commented 3 years ago

@woutse any updates on this one?

woutse commented 3 years ago

He! In the meantime above, lets say sub-issues, are already fixed! For composer 2.0 compatibilty we are waiting for Magento to approve our latest release.

hans2103 commented 3 years ago

?? Should Magento approve 3th party extensions?

woutse commented 3 years ago

Approval for Magento marketplace. The plugin is now installable via composer 2.X!