mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:44:02 +00:00
Fixing RedisCluster deprecation of phpredis 6. (#1208)
This commit is contained in:
parent
72b1b48edd
commit
d6d991ced6
1 changed files with 3 additions and 3 deletions
|
|
@ -28,8 +28,8 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper
|
||||||
$prefix = $this->config['tenancy.redis.prefix_base'] . $tenant->getTenantKey();
|
$prefix = $this->config['tenancy.redis.prefix_base'] . $tenant->getTenantKey();
|
||||||
$client = Redis::connection($connection)->client();
|
$client = Redis::connection($connection)->client();
|
||||||
|
|
||||||
$this->originalPrefixes[$connection] = $client->getOption($client::OPT_PREFIX);
|
$this->originalPrefixes[$connection] = $client->getOption(\Redis::OPT_PREFIX);
|
||||||
$client->setOption($client::OPT_PREFIX, $prefix);
|
$client->setOption(\Redis::OPT_PREFIX, $prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper
|
||||||
foreach ($this->prefixedConnections() as $connection) {
|
foreach ($this->prefixedConnections() as $connection) {
|
||||||
$client = Redis::connection($connection)->client();
|
$client = Redis::connection($connection)->client();
|
||||||
|
|
||||||
$client->setOption($client::OPT_PREFIX, $this->originalPrefixes[$connection]);
|
$client->setOption(\Redis::OPT_PREFIX, $this->originalPrefixes[$connection]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->originalPrefixes = [];
|
$this->originalPrefixes = [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue