Skip to content

Commit e9176a1

Browse files
Merge branch '4.4'
* 4.4: [Lock][HttpFoundation] Hot fix
2 parents a7ce2af + 4570456 commit e9176a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Store/StoreFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ public static function createStore($connection)
7272
if (!class_exists(AbstractAdapter::class)) {
7373
throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $this->dsn));
7474
}
75+
$storeClass = 0 === strpos($connection, 'memcached://') ? MemcachedStore::class : RedisStore::class;
7576
$connection = AbstractAdapter::createConnection($connection, ['lazy' => true]);
7677

77-
return 0 === strpos($connection, 'memcached://') ? new MemcachedStore($connection) : new RedisStore($connection);
78+
return new $storeClass($connection);
7879

7980
case 0 === strpos($connection, 'mssql://'):
8081
case 0 === strpos($connection, 'mysql:'):

0 commit comments

Comments
 (0)