-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 7.4 Incompatibility of paypal/module-braintree-core 4.4.0-p2 #38150
Comments
Hi @norgeindian. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @norgeindian, Thank you for reporting and collaboration. As per the Magento system requirements https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html Magento 2.4.5-p2 supports with php 8.1. Could you please check system requirements and please let us know if you are facing any issue. Thanks. |
@engcom-Bravo , that is correct. Magento indeed officially only supports PHP 8, even if it still works with PHP 7.4. |
Was reported before in: #37935 And even before that, I alerted at least 2 people from Adobe via Slack around this I believe somewhere in August 2023, they promised me they would deliver the message to the paypal team, but it seems like nothing has happened so far. And my guess would be that this will never get fixed. So I think your only chance is to replace the PHP 7.4 incompatible code with a composer patch. It's also becoming time to move on to PHP 8, most 3rd party modules are compatible with 8.1 and even 8.2 by now, we hardly run into problems with PHP compatibility these days anymore. It's just your own custom code that you'll need to update if it's not compatible yet. Also @engcom-Bravo: the "system requirements" documentation is not actually showing the system requirements, it's showing the software versions Adobe tested their code against, the actual requirements are far broader then what is displayed on that page. There was a community maintained system requirements document, but it has been abandoned unfortunately. |
@hostep Thanks for your contribution here. Hi @norgeindian, Thanks for your update. Currently Magento supports with php 8.1 and 8.2 could you please check the issue in the Latest released Magento Version and Magenti 2.4-develop branch. Thanks. |
Hi @norgeindian, We have noticed that this issue has not been updated since long time. Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this. Thanks |
Preconditions and environment
Steps to reproduce
composer require paypal/module-braintree-core:4.4.0-p2
composer.json
, this should be compatible with PHP 7.4 ("php": "~7.4.0||~8.1.0",
)bin/magento setup:di:compile
Expected result
bin/magento setup:di:compile
should not throw any errorActual result
bin/magento setup:di:compile
shows the following error message:MiBsyntax error, unexpected '|', expecting ';' or '
Additional information
Checking that issue more detailed, you will come to the class
\PayPal\Braintree\Gateway\Command\GetPaymentNonceCommand
with the following method:Unfortunately, union types for return types are a PHP 8 feature and not available in PHP 7.4
So in end it seems as if this version of the module is not compatible with PHP 7.4, even though it is stated.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: