Skip to content

[6.x] Fix *scan methods for phpredis - #32336

Merged
taylorotwell merged 2 commits into
laravel:6.xfrom
shufo:fix/phpredis-scan-commands
Apr 13, 2020
Merged

taylorotwell merged 2 commits into
laravel:6.xfrom
shufo:fix/phpredis-scan-commands

Conversation

@shufo

@shufo shufo commented Apr 11, 2020

Copy link
Copy Markdown
Contributor

This PR fixes #24222, previously fixed in #24313 but reverted by broken test.
hscan, zscan, sscan problem on phpredis that it can't iterate sets with cursor still occurs 6.x, 7.x branch so I requested this pr. If something is wrong with pull request process, please let me know.

This PR fixes *scan methods for phpredis and add missing *scan tests to redis connection.

Current Behaviour

Redis Facade set phpredis as client returns no cursor with same results on every *scan call. So it can not iterate sets that has many members.
image

Fixed Behaviour

Returns cursor with results on *scan methods for phpredis. This behaviour is compatible with predis adapter.
It can iterate over sets until all member has been returned.
image

@GrahamCampbell
GrahamCampbell requested a review from themsaid April 13, 2020 11:19
@taylorotwell
taylorotwell merged commit fbb9b17 into laravel:6.x Apr 13, 2020
@ghost ghost mentioned this pull request Apr 13, 2020
salmanarshad321 pushed a commit to salmanarshad321/framework that referenced this pull request Sep 23, 2026
* [6.x] Fix *scan methods for phpredis (laravel#24222)

* style(whitespace): add whitespace after operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants