Skip to content

Commit

Permalink
Fixing RedisCluster deprecation of phpredis 6. (#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasromanojf committed Apr 12, 2024
1 parent 72b1b48 commit d6d991c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Bootstrappers/RedisTenancyBootstrapper.php
Expand Up @@ -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);
}
}

Expand All @@ -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 = [];
Expand Down

0 comments on commit d6d991c

Please sign in to comment.