Skip to content

Commit 8fb59cc

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: silence warnings issued by Redis Sentinel on connection issues
2 parents 3c7124e + 4b2ebd9 commit 8fb59cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ public static function createConnection(#[\SensitiveParameter] string $dsn, arra
252252
} else {
253253
$extra = $passAuth ? [$params['auth']] : [];
254254

255-
$sentinel = new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
255+
$sentinel = @new $sentinelClass($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra);
256256
}
257257

258-
if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) {
258+
if ($address = @$sentinel->getMasterAddrByName($params['redis_sentinel'])) {
259259
[$host, $port] = $address;
260260
}
261261
} catch (\RedisException|\Relay\Exception $redisException) {

src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ public function __construct(array $options, \Redis|Relay|\RedisCluster|null $red
142142

143143
$sentinel = new \RedisSentinel($params);
144144
} else {
145-
$sentinel = new $sentinelClass($host, $port, $options['timeout'], $options['persistent_id'], $options['retry_interval'], $options['read_timeout']);
145+
$sentinel = @new $sentinelClass($host, $port, $options['timeout'], $options['persistent_id'], $options['retry_interval'], $options['read_timeout']);
146146
}
147147

148-
if ($address = $sentinel->getMasterAddrByName($sentinelMaster)) {
148+
if ($address = @$sentinel->getMasterAddrByName($sentinelMaster)) {
149149
[$host, $port] = $address;
150150
}
151151
} catch (\RedisException|\Relay\Exception $redisException) {

0 commit comments

Comments
 (0)