mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
14
lib/symfony/cache/Traits/RedisTrait.php
vendored
14
lib/symfony/cache/Traits/RedisTrait.php
vendored
@@ -58,7 +58,7 @@ trait RedisTrait
|
||||
parent::__construct($namespace, $defaultLifetime);
|
||||
|
||||
if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) {
|
||||
throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
|
||||
throw new InvalidArgumentException(\sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
|
||||
}
|
||||
|
||||
if ($redis instanceof \Predis\ClientInterface && $redis->getOptions()->exceptions) {
|
||||
@@ -201,7 +201,7 @@ trait RedisTrait
|
||||
};
|
||||
|
||||
if (isset($params['redis_sentinel']) && !is_a($class, \Predis\Client::class, true) && !class_exists(\RedisSentinel::class) && !class_exists(Sentinel::class)) {
|
||||
throw new CacheException(sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class));
|
||||
throw new CacheException(\sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and neither ext-redis >= 5.2 nor ext-relay have been found.', $class));
|
||||
}
|
||||
|
||||
$isRedisExt = is_a($class, \Redis::class, true);
|
||||
@@ -258,7 +258,7 @@ trait RedisTrait
|
||||
} while (++$hostIndex < \count($hosts) && !$address);
|
||||
|
||||
if (isset($params['redis_sentinel']) && !$address) {
|
||||
throw new InvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']), previous: $redisException ?? null);
|
||||
throw new InvalidArgumentException(\sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']), previous: $redisException ?? null);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -293,7 +293,7 @@ trait RedisTrait
|
||||
restore_error_handler();
|
||||
}
|
||||
if (!$isConnected) {
|
||||
$error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? sprintf(' (%s)', $error[1]) : '';
|
||||
$error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? \sprintf(' (%s)', $error[1]) : '';
|
||||
throw new InvalidArgumentException('Redis connection failed: '.$error.'.');
|
||||
}
|
||||
|
||||
@@ -418,9 +418,9 @@ trait RedisTrait
|
||||
$redis->getConnection()->setSentinelTimeout($params['timeout']);
|
||||
}
|
||||
} elseif (class_exists($class, false)) {
|
||||
throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster", "Relay\Relay" nor "Predis\ClientInterface".', $class));
|
||||
throw new InvalidArgumentException(\sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster", "Relay\Relay" nor "Predis\ClientInterface".', $class));
|
||||
} else {
|
||||
throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
|
||||
throw new InvalidArgumentException(\sprintf('Class "%s" does not exist.', $class));
|
||||
}
|
||||
|
||||
return $redis;
|
||||
@@ -434,7 +434,7 @@ trait RedisTrait
|
||||
|
||||
$result = [];
|
||||
|
||||
if ($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) {
|
||||
if (($this->redis instanceof \Predis\ClientInterface && ($this->redis->getConnection() instanceof ClusterInterface || $this->redis->getConnection() instanceof Predis2ClusterInterface)) || $this->redis instanceof RelayCluster) {
|
||||
$values = $this->pipeline(function () use ($ids) {
|
||||
foreach ($ids as $id) {
|
||||
yield 'get' => [$id];
|
||||
|
||||
Reference in New Issue
Block a user