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
Fix RedisCluster::getOption() and RedisCluster::setOption() argument types #7030
Conversation
94f705d
to
0d955de
Compare
I may be wrong here but the link you posted points to If the link is good though, the param name should change too (from name to option) |
0d955de
to
e6c3f11
Compare
Thx. Fixed the link and renamed name too. |
link is still wrong :) here's the right one: In the PR for setOption, the contributor decided to go for Do you know the answer? If it change between versions of Redis, we should keep retrocompatibility and allow string too, but if it's a mistake, it would be cool to fix getOption in that way too to keep consistency |
e6c3f11
to
39eabbe
Compare
I am not 100% sure, but I think it was a mistake. We never used anything else than int in SncRedisBundle. I think contributor used string because phpstorm stubs are most likely wrong - those specify string. I've changed it now for getOption too... |
39eabbe
to
489f0a3
Compare
489f0a3
to
793b655
Compare
Interesting thing that should be also mentioned, is that phpredis is doing something with this type currently in their dev branch phpredis/phpredis#2038. I would assume they broke their types they provide in reflection. But again, it's their dev branch only and this must have been done recently only. To go forward with this PR, I guess we should get an answer there first. |
(note: the CI failure is unrelated, you can rebase to fix it) |
793b655
to
7b78a7e
Compare
So, referenced issue was solved. So indeed it's int. I would say PR is ready. |
Thanks! |
See https://github.com/phpredis/phpredis/blob/aac42cd33510030bb62973f8886f4cd98b9b8003/redis_cluster.stub.php#L122
Related #6853