-
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
Unsupported PHP 8 command in Magento #33680
Comments
Hi @michalrostek. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@michalrostek thanks for reporting this issue! While we are addressing the issue, there is a possible workaround: require |
The internal team is working on a fix for this, I have linked the internal Jira ticket to the GitHub issue, so the status will be updated accordingly. |
@sivaschenko Thank you for verifying the issue. Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label |
I had the same issue and because of the error i could not update my composer.lock with a composer update. Even after requiring symfony/polyfill-php80 i still get the error. After these steps:
remove vendor folder and this one:
This prevents us from updating the composer.lock file, because composer update rollsback after a incomplete composer update. i get the following error:
System specifics: |
I took a better look and for this client we have multi source inventory disabled. When checking the composer plugin magento/inventory-composer-installer it tries to disable all modules that have magento/module-inventory disabled, because of this it needs functionality of the magento framework which doesn't work, because str_contains does not exist for php 7.4 and this is the reason why composer.lock cannot be updated. This is really blocking our magento upgrades. |
~/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php:74 |
@mrtuvn: the problematic code definitely exists in Magento OS 2.4.3, 2.4.2-p2 and 2.3.7-p1, I can see it in the pre-releases. |
@sivaschenko Do you already have a ETA? We would like to get started on M2.4.3 on monday if possible. |
nice to know that you have name "adobe" |
It seems we now found a workaround we replaced the magento msi composer plugin and after we could update our composer.lock. So for now we can work around it 😁. So its not a huge blocker anymore! We also require polyfill80 and that also helped out! Thanks for the tip @sivaschenko ! This is the module that we replaced in our composer.json: |
@hostep Just plain rude. The code that needed this fix was security-related and therefore not public until 2.4.3 was released. There is a several month gap between when 2.4.3 private security/release branches are frozen and when the 2.4.3 security code is synced back into 2.4-develop because of how our lifecycle works. At the time the 2.4.4 fix was delivered, the code was still private because 2.4.3 had not been delivered or synced back to 2.4-develop hence why we couldn't deliver a fix to 2.4-develop. We also couldn't deliver the fix to 2.4.3 branches because they were frozen due to our lifecycle. Having said all that, it isn't impossible for us to port the change to 2.4-develop if we had to but it would be uncommon to go through the dev cycle twice for the same release line (2.4.4). Also, it would be much faster to process the existing PR that @ihor-sviziev mentioned, than it would be to go through the entire lifecycle internally. |
Ok, since the issue still not fixed in 2.4-develop branch, I’m reopening the issue on the GitHub |
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Once all required labels are present, please add |
❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-1098 |
AC-1098 has been cancelled since there was another Jira ticket had been used! So the Jira ticket is - https://jira.corp.magento.com/browse/AC-1172 |
Hi @michalrostek. Thank you for your report.
The fix will be available with the upcoming release. |
Preconditions (*)
Steps to reproduce (*)
{{PHP Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Filesystem\Directory\str_contains() in <...>/magento/vendor/magento/framework/Filesystem/Directory/DenyListPathValidator.php:74
This file (DenyListPathValidator) is initialized in \Magento\Framework\Filesystem\Directory\WriteFactory.php which may affect not only the above case
Expected result (*)
PHP 7 command, instead of PHP 8
Actual result (*)
PHP 8 command
The text was updated successfully, but these errors were encountered: