From d77729405398b6699384bf2a9aaf76393aff6576 Mon Sep 17 00:00:00 2001 From: Alhubing <> Date: Wed, 6 Nov 2024 11:34:59 +0100 Subject: [PATCH 1/2] Remove cluster connection override to use default cluster connector from phpredis --- src/Connectors/PhpRedisSentinelConnector.php | 8 -------- tests/Connectors/PhpRedisSentinelConnectorTest.php | 12 ------------ 2 files changed, 20 deletions(-) diff --git a/src/Connectors/PhpRedisSentinelConnector.php b/src/Connectors/PhpRedisSentinelConnector.php index 468782f..51f5dd0 100644 --- a/src/Connectors/PhpRedisSentinelConnector.php +++ b/src/Connectors/PhpRedisSentinelConnector.php @@ -36,14 +36,6 @@ public function connect(array $config, array $options): PhpRedisSentinelConnecti return new PhpRedisSentinelConnection($connector(), $connector, $config); } - /** - * {@inheritdoc} - */ - public function connectToCluster(array $config, array $clusterOptions, array $options) - { - throw new NotImplementedException('The Redis Sentinel driver does not support connecting to clusters.'); - } - /** * Create the PhpRedis client instance which connects to Redis Sentinel. * diff --git a/tests/Connectors/PhpRedisSentinelConnectorTest.php b/tests/Connectors/PhpRedisSentinelConnectorTest.php index d5dad10..8b3238c 100644 --- a/tests/Connectors/PhpRedisSentinelConnectorTest.php +++ b/tests/Connectors/PhpRedisSentinelConnectorTest.php @@ -17,18 +17,6 @@ */ class PhpRedisSentinelConnectorTest extends TestCase { - public function test_connecting_to_cluster_is_not_possible() - { - $this->expectException(NotImplementedException::class); - - $connector = new PhpRedisSentinelConnector(); - $connector->connectToCluster( - config: [], - clusterOptions: [], - options: [] - ); - } - /** * @throws RedisException */ From 30103af23e540541c1fd4bf2252622217ae5f441 Mon Sep 17 00:00:00 2001 From: Marvin Mall Date: Wed, 6 Nov 2024 18:23:23 +0100 Subject: [PATCH 2/2] Remove obsolete NotImplementedException --- src/Connectors/PhpRedisSentinelConnector.php | 1 - src/Exceptions/NotImplementedException.php | 12 ------------ tests/Connectors/PhpRedisSentinelConnectorTest.php | 1 - 3 files changed, 14 deletions(-) delete mode 100644 src/Exceptions/NotImplementedException.php diff --git a/src/Connectors/PhpRedisSentinelConnector.php b/src/Connectors/PhpRedisSentinelConnector.php index 51f5dd0..61d81d4 100644 --- a/src/Connectors/PhpRedisSentinelConnector.php +++ b/src/Connectors/PhpRedisSentinelConnector.php @@ -8,7 +8,6 @@ use Illuminate\Support\Arr; use Namoshek\Redis\Sentinel\Connections\PhpRedisSentinelConnection; use Namoshek\Redis\Sentinel\Exceptions\ConfigurationException; -use Namoshek\Redis\Sentinel\Exceptions\NotImplementedException; use Redis; use RedisException; use RedisSentinel; diff --git a/src/Exceptions/NotImplementedException.php b/src/Exceptions/NotImplementedException.php deleted file mode 100644 index b070596..0000000 --- a/src/Exceptions/NotImplementedException.php +++ /dev/null @@ -1,12 +0,0 @@ -