From f9427bdb3f78399df2794c8945913c41c66c0fa2 Mon Sep 17 00:00:00 2001 From: Alhubing Date: Wed, 6 Nov 2024 18:25:42 +0100 Subject: [PATCH] Remove cluster connection override (#40) * Remove cluster connection override to use default cluster connector from phpredis * Remove obsolete NotImplementedException --------- Co-authored-by: Alhubing <> Co-authored-by: Marvin Mall --- src/Connectors/PhpRedisSentinelConnector.php | 9 --------- src/Exceptions/NotImplementedException.php | 12 ------------ tests/Connectors/PhpRedisSentinelConnectorTest.php | 13 ------------- 3 files changed, 34 deletions(-) delete mode 100644 src/Exceptions/NotImplementedException.php diff --git a/src/Connectors/PhpRedisSentinelConnector.php b/src/Connectors/PhpRedisSentinelConnector.php index 468782f..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; @@ -36,14 +35,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/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 @@ -expectException(NotImplementedException::class); - - $connector = new PhpRedisSentinelConnector(); - $connector->connectToCluster( - config: [], - clusterOptions: [], - options: [] - ); - } - /** * @throws RedisException */