-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] Add type to redis scan call to avoid using default "" which r… #51838
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
Conversation
I removed the deprecations label, as this does not introduce a new deprecation, but fixes one. Are you sure, this bug does not exist in 5.4? |
The code looks the same on 5.4. |
3aa2dc1
to
d0ed3dc
Compare
Hi, I've update the PR to use the 5.4 branch and add a test for this use case. I hope it looks good enough for you. Look forward to my first contribution. |
d0ed3dc
to
78b972d
Compare
78b972d
to
d9f93e3
Compare
…eturns empty array
d9f93e3
to
d97cfdd
Compare
Thanks for giving this a try. I'm closing in favor of #52036, which provides a more generic fix to such issues. This should still be fixed in phpredis, but at least we won't fall into the trap. |
…y behaviors of internal classes (nicolas-grekas) This PR was merged into the 6.3 branch. Discussion ---------- [Cache][VarExporter] Fix proxy generation to deal with edgy behaviors of internal classes | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #51770, #51679, #51700 | License | MIT Instead of #51838 This fixes the issue by not passing default values explicitly when they were not provided during the call to the method. Commits ------- c66a2f7 [Cache][VarExporter] Fix proxy generation to deal with edgy behaviors of internal classes
The
cache:pool:clear
command is not clearing the existing redis keys correctly. The method is being call without a validtype
, which gets a empty array as response.The redis
MONITOR
command shows the following type of call:"SCAN" "0" "COUNT" "1000" "MATCH" "<prefix>:*" "TYPE" ""
Correct would be to set the
TYPE
tostring
."SCAN" "0" "COUNT" "1000" "MATCH" "<prefix>:*" "TYPE" "string"
See Documentation: https://redis.io/commands/type/
This PullRequest also fix the deprecation:
Deprecated: Redis::scan(): Passing null to parameter #4 ($type) of type ?string is deprecated {"exception":"[object] (ErrorException(code: 0): Deprecated: Redis::scan(): Passing null to parameter #4 ($type) of type ?string is deprecated at /var/www/vendor/symfony/cache/Traits/Redis6Proxy.php:893)"