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 connecting to Redis via a socket file #45281
[Cache] Fix connecting to Redis via a socket file #45281
Conversation
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:
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! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
273084f
to
28bcd0e
@kbond I did a first PR to Symfony project and had some issues:
|
Hey @alebedev80, thanks for contributing! For (1), a few things:
For (2), I think you'll need to run the test suite with the
I'm not positive though, let me know if that doesn't work. |
28bcd0e
to
e27a74a
@kbond test failed with an error:
as i understand test envirionment start a Redis instance
Thank you! |
I'll have to ping @nicolas-grekas to help with this. |
@nicolas-grekas please help |
70160b3
to
74cc9b6
74cc9b6
to
0dada23
818c502
to
90c7b3d
I've rebased for 4.4, fixed the patch, and fixed the tests.
90c7b3d
to
214fdd1
Thank you @alebedev80. |
@nicolas-grekas thank you very much! |
In the commit was done follow changes in Traits/RedisTrait.php(188)
Old code:
$port = $hosts[0]['port'] ?? null;
New code:
$port = $hosts[0]['port'] ?? 6379;
With DSN "redis:///var/run/redis/redis.sock" raise an error:
Because phpredis doesn't allow socket connections with a port
Error
I added additional validation of connection type (by host or socket). Also I fixed condition when RedisSentinel connection call as it supports connections by host only.