Credis update to 1.6 breaks Magento 2.4.7
jorgb90 opened this issue · comments
Preconditions and environment
- Magento 2.4.7
- colinmollenhour/php-redis-session-abstract 1.6
Steps to reproduce
2 hours ago the framework package colinmollenhour/php-redis-session-abstract is updated to v1.6 and by this change it breaks Magento, so just run composer update and get the latest version.
Expected result
No errors
Actual result
[15-May-2024 21:18:24 UTC] PHP Fatal error: Class Magento\Framework\Session\SaveHandler\Redis\Config contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Cm\RedisSession\Handler\ConfigInterface::getRetries) in /home/xxx/public_html/vendor/magento/framework/Session/SaveHandler/Redis/Config.php on line 16
Additional information
https://github.com/colinmollenhour/php-redis-session-abstract/releases
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @jorgb90. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this
- To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
🕙 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, join the Community Contributions Triage session to discuss the appropriate ticket.
A possible workaround is to fix the version to 1.5.5
composer require colinmollenhour/php-redis-session-abstract:1.5.5
There's also an issue opened to revert the breaking changes on php-redis-session package.
Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
- 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- 3. Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to. - 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - 5. Add label
Issue: Confirmed
once verification is complete. - 6. Make sure that automatic system confirms that report has been added to the backlog.
@viniciusgborges thank you! I was only on 2.4.6-p2 and doing a composer update when Magento broke with this same Credis error. This fix worked for now until someone on Magento team can fix this properly. Not sure how this could possibly have been released? :/
Hello @jorgb90,
Thank you for the report and collaboration!
Verified this on 2.4.7 instance.
With colinmollenhour/php-redis-session-abstract 1.6.0, while running static decompile the below error is being thrown:
Compilation was started.
Application code generator... 3/9 [=========>------------------] 33% 4 secs 252.0 MiBPHP Fatal error: Class Magento\Framework\Session\SaveHandler\Redis\Config contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Cm\RedisSession\Handler\ConfigInterface::getRetries) in /opt/homebrew/var/www/magento247ce/vendor/magento/framework/Session/SaveHandler/Redis/Config.php on line 16
Fatal error: Class Magento\Framework\Session\SaveHandler\Redis\Config contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Cm\RedisSession\Handler\ConfigInterface::getRetries) in /opt/homebrew/var/www/magento247ce/vendor/magento/framework/Session/SaveHandler/Redis/Config.php on line 16
Hence confirming this issue.
✅ Jira issue https://jira.corp.adobe.com/browse/AC-11954 is successfully created for this GitHub issue.
✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Might be better to define a conflict with this specific version, so you don't pin the version 1.5.5 in your composer.json
file and forget about removing it again in the future.
Something like this is probably better:
diff --git a/composer.json b/composer.json
index 8621702..6d43808 100644
--- a/composer.json
+++ b/composer.json
@@ -152,6 +152,7 @@
"magento/module-wishlist-analytics": "*"
},
"conflict": {
+ "colinmollenhour/php-redis-session-abstract": "1.6.0",
"gene/bluefoot": "*"
},
"autoload-dev": {
After which you'll need to run composer update colinmollenhour/php-redis-session-abstract
same issue here, could be a possibile fix apply a patch or a complete rewrite to:
vendor/magento/framework/Session/SaveHandler/Redis/Config.php
and implement an empty method getRetries()?
Thank you,
Andrea.
@andrea-glam I have submitted a pull request to address this issue and provided composer patches for a more immediate solution. You can check it out at #38729
You can also utilize the conflict
configuration, as @hostep suggested, to prevent the installation of version 1.6.0 in your project.