[Cache] Add type to redis scan call to avoid using default "" which r…#51838
Closed
mfadul24 wants to merge 1 commit intosymfony:5.4from
Closed
[Cache] Add type to redis scan call to avoid using default "" which r…#51838mfadul24 wants to merge 1 commit intosymfony:5.4from
mfadul24 wants to merge 1 commit intosymfony:5.4from
Conversation
groensch24
approved these changes
Oct 4, 2023
Contributor
|
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? |
Member
|
The code looks the same on 5.4. |
3aa2dc1 to
d0ed3dc
Compare
Author
|
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
OskarStark
reviewed
Oct 10, 2023
…eturns empty array
d9f93e3 to
d97cfdd
Compare
Member
|
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. |
nicolas-grekas
added a commit
that referenced
this pull request
Oct 13, 2023
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
cache:pool:clearcommand 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
MONITORcommand shows the following type of call:"SCAN" "0" "COUNT" "1000" "MATCH" "<prefix>:*" "TYPE" ""Correct would be to set the
TYPEtostring."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)"