magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Credis update to 1.6 breaks Magento 2.4.7

Open jorgb90 opened this issue 1 year ago • 16 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.
  • [X] 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”.

jorgb90 avatar May 15 '24 21:05 jorgb90

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:


Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: 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.

m2-assistant[bot] avatar May 15 '24 21:05 m2-assistant[bot]

A possible workaround is to fix the version to 1.5.5 composer require colinmollenhour/php-redis-session-abstract:1.5.5

viniciusgborges avatar May 15 '24 23:05 viniciusgborges

There's also an issue opened to revert the breaking changes on php-redis-session package.

https://github.com/colinmollenhour/php-redis-session-abstract/issues/58

contardi avatar May 15 '24 23:05 contardi

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: :point_down:

  • [ ] 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 branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced 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.

m2-assistant[bot] avatar May 16 '24 05:05 m2-assistant[bot]

@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? :/

perfpcs avatar May 16 '24 07:05 perfpcs

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.

engcom-November avatar May 16 '24 07:05 engcom-November

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-11954 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 16 '24 07:05 github-jira-sync-bot

:white_check_mark: 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.

m2-assistant[bot] avatar May 16 '24 07:05 m2-assistant[bot]

A possible workaround is to fix the version to 1.5.5 composer require colinmollenhour/php-redis-session-abstract:1.5.5

For me with this it's working:

composer require colinmollenhour/php-redis-session-abstract:1.5.5

image

laasso avatar May 16 '24 09:05 laasso

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

hostep avatar May 16 '24 10:05 hostep

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 avatar May 16 '24 10:05 andrea-glam

@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 https://github.com/magento/magento2/pull/38729

You can also utilize the conflict configuration, as @hostep suggested, to prevent the installation of version 1.6.0 in your project.

TuVanDev avatar May 16 '24 10:05 TuVanDev

same issue here on 2.4.6-p5. Could we have a patch please?

PaulWatt avatar May 17 '24 10:05 PaulWatt

@PaulWatt, just downgrade colinmollenhour/php-redis-session-abstract to version 1.5.5 and wait until @colinmollenhour has had some time to look into https://github.com/colinmollenhour/php-redis-session-abstract/issues/58

hostep avatar May 17 '24 11:05 hostep

I released the latest master as v2.0.0 and the previous v1.5.5 as v1.7 so I believe that should effectively "roll back" the v1.6.0 release. My apologies for this debacle, I should have read more carefully how the "^" operator works for Composer.

colinmollenhour avatar May 20 '24 15:05 colinmollenhour

@chernenm, @jorgb90: I believe we can close this issue, now that version 1.7.0 was released which fixes this, right?

hostep avatar May 21 '24 19:05 hostep

@hostep Yes correct. Confirmed.

jorgb90 avatar May 25 '24 12:05 jorgb90