Skip to content

[ECP-9582] Remove union return type to fix compatibility issue on Magento 2.4.4 and 2.4.5#2859

Merged
candemiralp merged 2 commits intomainfrom
ECP-9582
Jan 24, 2025
Merged

[ECP-9582] Remove union return type to fix compatibility issue on Magento 2.4.4 and 2.4.5#2859
candemiralp merged 2 commits intomainfrom
ECP-9582

Conversation

@candemiralp
Copy link
Contributor

@candemiralp candemiralp commented Jan 23, 2025

Description

We previously introduced a union return type to DownloadApplePayDomainAssociationFile class that broke the compatibility of the plugin with Magento 2.4.4 and 2.4.5, although it is supported with PHP 8. The union return type is now removed from this class.

Tested scenarios

  • Downloading Apple Pay domain association file

Fixes #2842

@candemiralp candemiralp added the Fix Indicates a bug fix label Jan 23, 2025
@sonarqubecloud
Copy link

@candemiralp candemiralp merged commit cacef78 into main Jan 24, 2025
15 checks passed
@candemiralp candemiralp deleted the ECP-9582 branch January 24, 2025 12:58
@sena1482 sena1482 changed the title [ECP-9582] Fix broken Magento compatibility by removing union return type [ECP-9582] Remove union return type to fix compatibility issue on Magento 2.4.4 and 2.4.5 Feb 4, 2025
@aschrammel
Copy link
Contributor

aschrammel commented Feb 10, 2025

@candemiralp Just FYI: We faced similar problems in the past on the union return type in \Adyen\Payment\Model\OrderRepository::getOrderByQuoteId.

@candemiralp
Copy link
Contributor Author

Hello @aschrammel,

Thank you for the heads-up! Do you get an issue while running bin/magento di:compile command? Could you please share your Magento, PHP and plugin versions?

Best Regards,
Can

@aschrammel
Copy link
Contributor

Hi @candemiralp

As said we received that error in the past on bin/magento setup:die:compile.
Can't say for sure how it is now, as we patched it on our end, removing the union type.

Not sure on which versions we've been, when it happened. Can give it a try, when I'm back if it still happens.

@candemiralp
Copy link
Contributor Author

Hello @aschrammel,

Thank you for the explanation. I've tried compiling the generated files on Magento 2.4.4 and PHP 8.2 without being able to reproduce the issue. Please let us know if the issue is persistent on your end.

Best Regards,
Can

@aschrammel
Copy link
Contributor

Good morning @candemiralp,

Sorry for the late reply. Seems to be fine on our end as well now.

Best regards
Andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Indicates a bug fix

Projects

None yet

3 participants