Skip to content

Commit

Permalink
Remove cluster connection override (#40)
Browse files Browse the repository at this point in the history
* Remove cluster connection override to use default cluster connector from phpredis

* Remove obsolete NotImplementedException

---------

Co-authored-by: Alhubing <>
Co-authored-by: Marvin Mall <[email protected]>
  • Loading branch information
Alhubing and Namoshek authored Nov 6, 2024
1 parent d4742bd commit f9427bd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
9 changes: 0 additions & 9 deletions src/Connectors/PhpRedisSentinelConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
Expand Down
12 changes: 0 additions & 12 deletions src/Exceptions/NotImplementedException.php

This file was deleted.

13 changes: 0 additions & 13 deletions tests/Connectors/PhpRedisSentinelConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Redis\RedisManager;
use Namoshek\Redis\Sentinel\Connections\PhpRedisSentinelConnection;
use Namoshek\Redis\Sentinel\Connectors\PhpRedisSentinelConnector;
use Namoshek\Redis\Sentinel\Exceptions\NotImplementedException;
use Namoshek\Redis\Sentinel\Tests\TestCase;
use Redis;
use RedisException;
Expand All @@ -17,18 +16,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
*/
Expand Down

0 comments on commit f9427bd

Please sign in to comment.