-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[8.x] Improve PhpRedis flushing #40544
[8.x] Improve PhpRedis flushing #40544
Conversation
translate Predis syntax to PhpRedis' `true` parameter
I know nothing of the internals here so I'm not the right person to review this. |
|
||
foreach ($this->client->_masters() as $master) { | ||
$this->client->flushDb($master); | ||
if (strtoupper((string) $arguments[0] ?? null) === 'ASYNC') { |
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 causes a lot of tests to fail for me with an index access that does not exist.
It should be if (strtoupper((string) ($arguments[0] ?? null)) === 'ASYNC') {
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.
As sometimes there are no arguments at all and the string cast takes precedence.
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.
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.
I'll make a PR with tests and the changes.
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.
See #40571
Followup to #40446 to make PhpRedis connections behave like Predis as usual.
PhpRedisClusterConnection
ASYNC
modifier to both PhpRedisflushdb()
methodsPhpRedisClusterConnection::flushdb()
will now fireCommandExecuted
events as well