-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
RedisTrait is incompatible with PhpRedis 6.0 when using RedisSentinel and a DSN #51678
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
Comments
Thank you for your report. Would you be able to work on a fix for the 5.4 branch? |
No problem. I'll see if I can make some time later today. |
Reflection is fine, I think. I'd prefer to detect the correct way of calling the constructor before we actually call it. |
or using |
I've create a PR on the 5.4 branch, but there are some changes in the 6.x tree that might make it harder to directly merge it over. |
….0 (Qonstrukt) This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Cache] Fix support for Redis Sentinel using php-redis 6.0.0 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #51678 | License | MIT Added support for [php-redis 6.0.0](https://github.com/phpredis/phpredis/blob/develop/CHANGELOG.md#600---2023-09-09-github-pecl) to `Symfony/Component/Cache/Traits/RedisTrait`. Made changes to how `RedisSentinel` is constructed, which now uses [the same constructor](phpredis/phpredis@ebb2386e) as the main `Redis` class. Didn't find any other changes that might be relevant yet, but it's why I mention Redis Sentinel explicitly. Commits ------- 9423c71 [Cache] Fix support for Redis Sentinel using php-redis 6.0.0
Any plan for this to come into the 6.3 branch? |
@igoooor yes. Maintained branches are merged together (generally once a week) to propagate bug fixes to newer branches. |
I think the same issue exists for \Symfony\Component\Messenger\Bridge\Redis\Transport\Connection no? |
How come that the package has not a fixed dependency on the libs here? Since an upgrade to 7.x could break it again? |
@igoooor it does, I'm just looking into why the sentinel mode cannot connect. |
Symfony version(s) affected
6.3.x
Description
Version 6.0 of PhpRedis (ext-redis) got released a little over a week ago, and unfortunately the API of RedisSentinel changed such that it's no longer compatible with the way it's being constructed from
Symfony\Component\Cache\Traits\RedisTrait
when using a DSN.This will throw errors like:
The constructor of
RedisSentinel
is now synchronised with the one used in theRedis
class:phpredis/phpredis@ebb2386e
Perhaps there are more compatibility issues, but we haven't run into them with just a single Redis Node, without sentinel on our dev environment.
How to reproduce
Using a DSN like this causes problems:
Possible Solution
Support the new single parameter constructor for at least
RedisSentinel
, which is now synchronised with theRedis
class implementation.Additional Context
No response
The text was updated successfully, but these errors were encountered: