Skip to content

Commit 5a5c3b3

Browse files
Jan Christoph Beyernicolas-grekas
authored andcommitted
fix redis multi host dsn not recognized
1 parent da246f4 commit 5a5c3b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Session/Storage/Handler/SessionHandlerFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public static function createHandler($connection): AbstractSessionHandler
5050
case 0 === strpos($connection, 'file://'):
5151
return new StrictSessionHandler(new NativeFileSessionHandler(substr($connection, 7)));
5252

53-
case 0 === strpos($connection, 'redis://'):
54-
case 0 === strpos($connection, 'rediss://'):
55-
case 0 === strpos($connection, 'memcached://'):
53+
case 0 === strpos($connection, 'redis:'):
54+
case 0 === strpos($connection, 'rediss:'):
55+
case 0 === strpos($connection, 'memcached:'):
5656
if (!class_exists(AbstractAdapter::class)) {
5757
throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $connection));
5858
}
59-
$handlerClass = 0 === strpos($connection, 'memcached://') ? MemcachedSessionHandler::class : RedisSessionHandler::class;
59+
$handlerClass = 0 === strpos($connection, 'memcached:') ? MemcachedSessionHandler::class : RedisSessionHandler::class;
6060
$connection = AbstractAdapter::createConnection($connection, ['lazy' => true]);
6161

6262
return new $handlerClass($connection);

0 commit comments

Comments
 (0)