mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
101 stars 53 forks source link

Fix Multishipping dependency when replaced #376

Closed peterjaap closed 3 years ago

peterjaap commented 3 years ago

You added Multishipping support in the latest release. You seem to already know that this option is virtually never used, judging from this comment.

It is great that you acknowledge this and try to work around the fact that many shops replace Magento_Multishipping. However, in PlaceOrder.php, you still use an interface from that module, which breaks DI compilation;

Compilation was started.
%message% 0/9 [>---------------------------]   0% < 1 sec 38.0 MiBProxies code generation... 0/9 [>------------------------]   0% < 1 sec 38.0 MiB
Proxies code generation... 1/9 [==>----------------------]  11% 2 secs 44.0 MiB
Repositories code generation... 1/9 [==>------------------]  11% 2 secs 44.0 MiBPHP Fatal error:  Uncaught Error: Interface 'Magento\Multishipping\Model\Checkout\Type\Multishipping\PlaceOrderInterface' not found in /builds/client/magento2/vendor/mollie/magento2/Multishipping/PlaceOrder.php:19
Stack trace:
#0 /builds/client/magento2/vendor/composer/ClassLoader.php(444): include()
#1 /builds/client/magento2/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 [internal function]: spl_autoload_call()
#4 /builds/client/magento2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()
#5 /builds/client/magento2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#6 /builds/client/magento2/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#7 /builds/client/magento2/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.ph in /builds/client/magento2/vendor/mollie/magento2/Multishipping/PlaceOrder.php on line 19

So this update breaks our deployment when upgrading to this version for all our shops that use Mollie. Could you please fix this? Maybe you could introduce an add-on package mollie/magento2-multishipping or something that introduces this functionality without cluttering the extension with useless code, like your competitor does.

Frank-Magmodules commented 3 years ago

Hi @peterjaap , we are closing this issue as this is a duplicate of https://github.com/mollie/magento2/issues/375. We are already working on an update.