We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7ce2af + 4570456 commit e9176a1Copy full SHA for e9176a1
Store/StoreFactory.php
@@ -72,9 +72,10 @@ public static function createStore($connection)
72
if (!class_exists(AbstractAdapter::class)) {
73
throw new InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $this->dsn));
74
}
75
+ $storeClass = 0 === strpos($connection, 'memcached://') ? MemcachedStore::class : RedisStore::class;
76
$connection = AbstractAdapter::createConnection($connection, ['lazy' => true]);
77
- return 0 === strpos($connection, 'memcached://') ? new MemcachedStore($connection) : new RedisStore($connection);
78
+ return new $storeClass($connection);
79
80
case 0 === strpos($connection, 'mssql://'):
81
case 0 === strpos($connection, 'mysql:'):
0 commit comments