[Lock][HttpFoundation] Hot fix

This commit is contained in:
Nicolas Grekas 2019-10-30 14:14:20 +01:00
parent 0b5b6fa79f
commit 301ec496ea
2 changed files with 4 additions and 2 deletions

View File

@ -56,9 +56,10 @@ class SessionHandlerFactory
if (!class_exists(AbstractAdapter::class)) {
throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $this->dsn));
}
$handlerClass = 0 === strpos($connection, 'memcached://') ? MemcachedSessionHandler::class : RedisSessionHandler::class;
$connection = AbstractAdapter::createConnection($connection, ['lazy' => true]);
return 0 === strpos($connection, 'memcached://') ? new MemcachedSessionHandler($connection) : new RedisSessionHandler($connection);
return new $handlerClass($connection);
case 0 === strpos($connection, 'pdo_oci://'):
if (!class_exists(DriverManager::class)) {

View File

@ -72,9 +72,10 @@ class StoreFactory
if (!class_exists(AbstractAdapter::class)) {
throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $this->dsn));
}
$storeClass = 0 === strpos($connection, 'memcached://') ? MemcachedStore::class : RedisStore::class;
$connection = AbstractAdapter::createConnection($connection, ['lazy' => true]);
return 0 === strpos($connection, 'memcached://') ? new MemcachedStore($connection) : new RedisStore($connection);
return new $storeClass($connection);
case 0 === strpos($connection, 'mssql://'):
case 0 === strpos($connection, 'mysql:'):