Skip to content

Commit 6590972

Browse files
[Lock][HttpFoundation] Hot fix
1 parent e601eeb commit 6590972

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Session/Storage/Handler/SessionHandlerFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ public static function createHandler($connection): AbstractSessionHandler
5656
if (!class_exists(AbstractAdapter::class)) {
5757
throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $this->dsn));
5858
}
59+
$handlerClass = 0 === strpos($connection, 'memcached://') ? MemcachedSessionHandler::class : RedisSessionHandler::class;
5960
$connection = AbstractAdapter::createConnection($connection, ['lazy' => true]);
6061

61-
return 0 === strpos($connection, 'memcached://') ? new MemcachedSessionHandler($connection) : new RedisSessionHandler($connection);
62+
return new $handlerClass($connection);
6263

6364
case 0 === strpos($connection, 'pdo_oci://'):
6465
if (!class_exists(DriverManager::class)) {

0 commit comments

Comments
 (0)