From 21968a1c477782f162828a172462b46262dff2c1 Mon Sep 17 00:00:00 2001 From: Steff Missot Date: Mon, 11 Sep 2023 21:51:35 +0200 Subject: [PATCH] [10.x] Support for phpredis 6.0.0 (#48364) * Support for phpredis 6.0.0, fix for OPT_SLAVE_FAILOVER * PHPSTAN: Remove ignored error "Access to undefined constant" --- phpstan.src.neon.dist | 1 - src/Illuminate/Redis/Connectors/PhpRedisConnector.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/phpstan.src.neon.dist b/phpstan.src.neon.dist index e41d8a55fc34..f5d4e57505de 100644 --- a/phpstan.src.neon.dist +++ b/phpstan.src.neon.dist @@ -4,7 +4,6 @@ parameters: level: 0 ignoreErrors: - "#\\(void\\) is used#" - - "#Access to undefined constant#" - "#Access to an undefined property#" - "#Call to an undefined method#" - "#but return statement is missing.#" diff --git a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php b/src/Illuminate/Redis/Connectors/PhpRedisConnector.php index a39f925ba3fc..d15b15cd31d8 100644 --- a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php +++ b/src/Illuminate/Redis/Connectors/PhpRedisConnector.php @@ -196,7 +196,7 @@ protected function createRedisClusterInstance(array $servers, array $options) } if (! empty($options['failover'])) { - $client->setOption(Redis::OPT_SLAVE_FAILOVER, $options['failover']); + $client->setOption(RedisCluster::OPT_SLAVE_FAILOVER, $options['failover']); } if (! empty($options['name'])) {