-
Notifications
You must be signed in to change notification settings - Fork 326
feat: phpredis: add support for OPT_SCAN #745
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
What about Predis? |
The original issue #608 was only mentioning phpredis. I just add predis support too. Let me know if it is ok. Thanks |
$dsnOptions = array_merge($defaultOptions, $options, $dsnOptions); | ||
|
||
if (isset($options['scan']) && $options['scan'] === 'prefix') { | ||
$dsnOptions[Redis::OPT_SCAN] = Redis::SCAN_PREFIX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is overwritten by next instruction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, moved after parseDsn() so the options get merged. Resolved at 95f7e4e
$dsnOptions = array_merge($defaultOptions, $options, $dsnOptions); | ||
|
||
if (isset($options['scan']) && $options['scan'] === 'prefix') { | ||
$dsnOptions[Redis::OPT_SCAN] = Redis::SCAN_PREFIX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class shouldn't use \Redis class, as that belongs to phpredis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved at 95f7e4e using class constants
37c8fe3
to
e049151
Compare
e8cae42
to
bda25c6
Compare
Sorry, in the end found this option is not relevant for predis so I've removed it. What was mistaking me was that there was never added support for |
457aea4
to
d2ba59a
Compare
d2ba59a
to
dedf291
Compare
Fixes #608