8000 Merge branch '4.4' into 5.2 · symfony/cache@c13bfc6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c13bfc6

Browse files
Merge branch '4.4' into 5.2
* 4.4: [Config][DependencyInjection] Uniformize trailing slash handling [PropertyInfo] Make ReflectionExtractor correctly extract nullability [PropertyInfo] fix attribute namespace with recursive traits Check redis extension version [Security] Update Russian translations [VarExporter] Add support of PHP enumerations [Security] Added missing Japanese translations [Security] Added missing Polish translations [Security] Add missing Italian translations #41051 [Security] Missing translations pt_BR getProtocolVersion may return null [Translation] Set default locale for IdentityTranslatorTest
2 parents 1d801d1 + f133937 commit c13bfc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Traits/RedisTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public static function createConnection($dsn, array $options = [])
189189
}
190190

191191
try {
192-
@$redis->{$connect}($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ['stream' => $params['ssl'] ?? null]);
192+
@$redis->{$connect}($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') ? [['stream' => $params['ssl'] ?? null]] : []);
193193

194194
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
195195
$isConnected = $redis->isConnected();
@@ -252,7 +252,7 @@ public static function createConnection($dsn, array $options = [])
252252
}
253253

254254
try {
255-
$redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], (bool) $params['persistent'], $params['auth'] ?? '', $params['ssl'] ?? null);
255+
$redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], (bool) $params['persistent'], $params['auth'] ?? '', ...\defined('Redis::SCAN_PREFIX') ? [$params['ssl'] ?? null] : []);
256256
} catch (\RedisClusterException $e) {
257257
throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e->getMessage());
258258
}

0 commit comments

Comments
 (0)
0