1
0
Fork 0
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:
Lucas Romano 2024-04-12 15:05:55 -03:00 committed by GitHub
parent 72b1b48edd
commit d6d991ced6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,8 +28,8 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper
$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 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper
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 = [];