Skip to content

[Cache] Fix support for Redis Sentinel using php-redis 6.0.0 #51683

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

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

Qonstrukt
Copy link
Contributor

@Qonstrukt Qonstrukt commented Sep 18, 2023

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 to Symfony/Component/Cache/Traits/RedisTrait.

Made changes to how RedisSentinel is constructed, which now uses the same constructor 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.

'host' => $host,
'port' => $port,
'connectTimeout' => $params['timeout'],
'persistent' => $params['persistent_id'],
Copy link
Contributor Author

@Qonstrukt Qonstrukt Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no connect or pconnect call using RedisSentinel. So the decision of being persistent or not is being take by this value being null or set to a string. Not sure why it was converted to string before, but this works perfectly fine on my environment (without persistence) at least.

@nicolas-grekas
Copy link
Member

Thank you @Qonstrukt.

@nicolas-grekas nicolas-grekas merged commit c0fbe7f into symfony:5.4 Sep 19, 2023
@nicolas-grekas nicolas-grekas added this to the 5.4 milestone Sep 25, 2023
nicolas-grekas added a commit that referenced this pull request Sep 28, 2023
This PR was merged into the 6.4 branch.

Discussion
----------

[Cache] Fix two initializations of Redis Sentinel

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT

After #51687 and #51683 have been merged, there are now two initializations of Redis Sentinel, which also leads to the integration test failure mentioned in [this comment](#51687 (comment)). This PR fixes this.

Commits
-------

2d23a1b [Cache] Fix two initializations of Redis Sentinel
This was referenced Sep 30, 2023
nicolas-grekas added a commit that referenced this pull request Nov 21, 2023
… 6.0.0 (pepeh)

This PR was squashed before being merged into the 6.3 branch.

Discussion
----------

[Messenger] Fix support for Redis Sentinel using php-redis 6.0.0

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #52487
| 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/Messenger/Bridge/Redis/Transport/Connection.
A similar fix was done for RedisTrait before: #51683

Commits
-------

42a80db [Messenger] Fix support for Redis Sentinel using php-redis 6.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants