Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
155 stars 211 forks source link

In 9.2.0 the setup:install command fails when running the Adyen_Payment schema recurring #2526

Closed marinagociulybe closed 8 months ago

marinagociulybe commented 9 months ago

Describe the bug With the latest 9.2.0 version of the module, the setup:install command fails.

To Reproduce Steps to reproduce the behavior:

  1. We're running the setup:install command as part of running the integration tests
  2. It fails with the following error:

    
    Module 'Adyen_Payment':
    Running schema recurring...
    In Config.php line 452:
    
    [Magento\Framework\Exception\LocalizedException]
    Invalid entity_type specified: customer

Exception trace:

at /project/vendor/magento/module-eav/Model/Config.php:452 Magento\Eav\Model\Config->getEntityType() at /project/vendor/magento/module-eav/Model/Entity/AbstractEntity.php:324 ... ... ... Adyen\Payment\Helper\PaymentMethodsFactory->create() at /project/vendor/adyen/module-payment/Setup/Recurring.php:25 Adyen\Payment\Setup\Recurring->install() at /project/setup/src/Magento/Setup/Model/Installer.php:1120 Magento\Setup\Model\Installer->handleDBSchemaData() at /project/setup/src/Magento/Setup/Model/Installer.php:898 Magento\Setup\Model\Installer->installSchema() at n/a:n/a call_user_func_array() at /project/setup/src/Magento/Setup/Model/Installer.php:388 Magento\Setup\Model\Installer->install() at /project/setup/src/Magento/Setup/Console/Command/InstallCommand.php:237 Magento\Setup\Console\Command\InstallCommand->execute() at /project/vendor/symfony/console/Command/Command.php:298 Symfony\Component\Console\Command\Command->run() at /project/vendor/symfony/console/Application.php:1040 Symfony\Component\Console\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:301 Symfony\Component\Console\Application->doRun() at /project/vendor/magento/framework/Console/Cli.php:116 Magento\Framework\Console\Cli->doRun() at /project/vendor/symfony/console/Application.php:171 Symfony\Component\Console\Application->run() at /project/bin/magento:23



**Expected behavior**
Run without issues.

**Magento version**
2.4.6-p3

**Plugin version**
9.2.0

**Additional context**
I have fixed this by renaming `vendor/adyen/module-payment/Setup/Recurring.php` to `vendor/adyen/module-payment/Setup/RecurringData.php`, with a composer patch, since then it will be handled by Magento in the `data-recurring` step instead of `schema-recurring`, which would be the proper place since this is altering data. Ideally, the dependencies introduced in the Setup class should be minimal, so `vendor/adyen/module-payment/Helper/PaymentMethods.php` should probably be avoided.
khushboo-singhvi commented 9 months ago

Hello @marinagociulybe,

Thank you for bringing up the concern, and we're glad to inform you that the issue has been addressed. We already have a Pull Request (PR) in progress, and you can expect it to be included in the upcoming release scheduled for next week.

We appreciate your patience and understanding as we work to improve our software. If you have any further questions or feedback, please feel free to let us know.

Regards! Khushboo

marinagociulybe commented 9 months ago

Sounds good. Thanks, @khushboo-singhvi!