Skip to content

Commit d6d991c

Browse files
Fixing RedisCluster deprecation of phpredis 6. (#1208)
1 parent 72b1b48 commit d6d991c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Bootstrappers/RedisTenancyBootstrapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function bootstrap(Tenant $tenant)
2828
$prefix = $this->config['tenancy.redis.prefix_base'] . $tenant->getTenantKey();
2929
$client = Redis::connection($connection)->client();
3030

31-
$this->originalPrefixes[$connection] = $client->getOption($client::OPT_PREFIX);
32-
$client->setOption($client::OPT_PREFIX, $prefix);
31+
$this->originalPrefixes[$connection] = $client->getOption(\Redis::OPT_PREFIX);
32+
$client->setOption(\Redis::OPT_PREFIX, $prefix);
3333
}
3434
}
3535

@@ -38,7 +38,7 @@ public function revert()
3838
foreach ($this->prefixedConnections() as $connection) {
3939
$client = Redis::connection($connection)->client();
4040

41-
$client->setOption($client::OPT_PREFIX, $this->originalPrefixes[$connection]);
41+
$client->setOption(\Redis::OPT_PREFIX, $this->originalPrefixes[$connection]);
4242
}
4343

4444
$this->originalPrefixes = [];

0 commit comments

Comments
 (0)