Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6e626d

Browse files
committed
map legacy options to the "sentinel" key when parsing DSNs
1 parent27ef10f commitb6e626d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,21 @@ public static function fromDsn(#[\SensitiveParameter] string $dsn, array $option
260260
},$paramss,$dsns);
261261
}
262262

263+
if (isset($options['sentinel']) &&isset($options['redis_sentinel'])) {
264+
thrownewInvalidArgumentException('Cannot use both "sentinel" and "redis_sentinel" at the same time.');
265+
}
266+
267+
if (isset($options['sentinel']) &&isset($options['sentinel_master'])) {
268+
thrownewInvalidArgumentException('Cannot use both "sentinel" and "sentinel_master" at the same time.');
269+
}
270+
271+
if (isset($options['redis_sentinel']) &&isset($options['sentinel_master'])) {
272+
thrownewInvalidArgumentException('Cannot use both "redis_sentinel" and "sentinel_master" at the same time.');
273+
}
274+
275+
$options['sentinel'] ??=$options['redis_sentinel'] ??$options['sentinel_master'] ??null;
276+
unset($options['redis_sentinel'],$options['sentinel_master']);
277+
263278
if ($invalidOptions =array_diff(array_keys($options),array_keys(self::DEFAULT_OPTIONS), ['host','port'])) {
264279
thrownewLogicException(\sprintf('Invalid option(s) "%s" passed to the Redis Messenger transport.',implode('", "',$invalidOptions)));
265280
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp