8000 [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension by renan · Pull Request #39363 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Support Redis Sentinel mode when using phpredis/phpredis extension #39363

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! Support Redis Sentinel mode when using phpredis/phpredis exten…
…sion
  • Loading branch information
renan committed Dec 8, 2020
commit c3086f77d481c179e552033b43f6ae46aec09b2f
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Traits/RedisTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static function createConnection($dsn, array $options = [])
if (isset($params['redis_sentinel'])) {
$sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval']);

if (!([$host, $port] = $sentinel->getMasterAddrByName($params['redis_sentinel']))) {
if (![$host, $port] = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
throw new InvalidArgumentException(sprintf('Failed to retrieve master information from master name "%s" and address "%s:%d".', $params['redis_sentinel'], $host, $port));
}
}
Expand Down
0