From 8e60f5c416eda32b48b75c25828815dec8a21b7d Mon Sep 17 00:00:00 2001 From: Lucas Romano Date: Fri, 12 Apr 2024 14:10:25 -0300 Subject: [PATCH] Fixing RedisCluster deprecation of phpredis 6. --- src/Bootstrappers/RedisTenancyBootstrapper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bootstrappers/RedisTenancyBootstrapper.php b/src/Bootstrappers/RedisTenancyBootstrapper.php index 7536984e3..c230af338 100644 --- a/src/Bootstrappers/RedisTenancyBootstrapper.php +++ b/src/Bootstrappers/RedisTenancyBootstrapper.php @@ -28,8 +28,8 @@ public function bootstrap(Tenant $tenant) $prefix = $this->config['tenancy.redis.prefix_base'] . $tenant->getTenantKey(); $client = Redis::connection($connection)->client(); - $this->originalPrefixes[$connection] = $client->getOption($client::OPT_PREFIX); - $client->setOption($client::OPT_PREFIX, $prefix); + $this->originalPrefixes[$connection] = $client->getOption(\Redis::OPT_PREFIX); + $client->setOption(\Redis::OPT_PREFIX, $prefix); } } @@ -38,7 +38,7 @@ public function revert() foreach ($this->prefixedConnections() as $connection) { $client = Redis::connection($connection)->client(); - $client->setOption($client::OPT_PREFIX, $this->originalPrefixes[$connection]); + $client->setOption(\Redis::OPT_PREFIX, $this->originalPrefixes[$connection]); } $this->originalPrefixes = [];