[5.6] add *scan methods to work on phpredis connection v2 #24299
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.
This adds the adapter methods to properly utilize PhpRedis commands for scan, sscan, hscan, and zscan. fixes #24222 .... take 2.
I reorganized the methods, fixed docblocks and tried to make the changes to the tests a bit clearer. The reason for the core InteractsWithRedis changes is because setUp runs after any dataProviders so rather than having to call connect on every driver, having the configureConnections call in both the setUp and the dataProvider means that everything works. Additionally the prefix addition ensures that all commands are tested with both a prefix and non-prefixed connection as there is currently a bug awaiting this merge to be fixed as well (#24257).