Skip to content
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

[Cache] Fix RedisTrait::createConnection for cluster #50585

Conversation

darkanakin41
Copy link
Contributor

@darkanakin41 darkanakin41 commented Jun 7, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? No
Deprecations? No
Tickets Fix #50509
License MIT
Doc PR N/A

When the dsn contains redis_cluster=1 or redis_cluster=true the value was not properly parsed, and the class generated was not the expected RedisCluster.

The reason is that the PHP core function match make a === check.

So, as the dsn is a string, the $params['redis_cluster'] needs to be force to a bool

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title bug #50509 [Cache] Fix RedisTrait::createConnection for cluster [Cache] bug #50509 Fix RedisTrait::createConnection for cluster Jun 7, 2023
@darkanakin41
Copy link
Contributor Author

darkanakin41 commented Jun 7, 2023

I don't know how to fix appveyor :(

@derrabus
Copy link
Member

derrabus commented Jun 7, 2023

I don't know how to fix appveyor :(

You don't need to. The failure is unrelated to your changes.

@nicolas-grekas nicolas-grekas changed the title [Cache] bug #50509 Fix RedisTrait::createConnection for cluster [Cache] Fix RedisTrait::createConnection for cluster Jun 8, 2023
@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 5.4 Jun 8, 2023
@nicolas-grekas nicolas-grekas changed the base branch from 6.3 to 5.4 June 8, 2023 21:03
@nicolas-grekas nicolas-grekas force-pushed the issue-50509-redis-trait-dsn-processing branch from 5c59e89 to ca8e328 Compare June 8, 2023 21:04
@nicolas-grekas
Copy link
Member

Thank you @darkanakin41.

@nicolas-grekas nicolas-grekas merged commit ca9a8c1 into symfony:5.4 Jun 8, 2023
9 of 11 checks passed
This was referenced Jun 26, 2023
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.

None yet

4 participants