File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,13 @@ public static function createStore($connection)
6969 case 'semaphore ' === $ connection :
7070 return new SemaphoreStore ();
7171
72- case 0 === strpos ($ connection , 'redis:// ' ):
73- case 0 === strpos ($ connection , 'rediss:// ' ):
74- case 0 === strpos ($ connection , 'memcached:// ' ):
72+ case 0 === strpos ($ connection , 'redis: ' ):
73+ case 0 === strpos ($ connection , 'rediss: ' ):
74+ case 0 === strpos ($ connection , 'memcached: ' ):
7575 if (!class_exists (AbstractAdapter::class)) {
7676 throw new InvalidArgumentException (sprintf ('Unsupported DSN "%s". Try running "composer require symfony/cache". ' , $ connection ));
7777 }
78- $ storeClass = 0 === strpos ($ connection , 'memcached:// ' ) ? MemcachedStore::class : RedisStore::class;
78+ $ storeClass = 0 === strpos ($ connection , 'memcached: ' ) ? MemcachedStore::class : RedisStore::class;
7979 $ connection = AbstractAdapter::createConnection ($ connection , ['lazy ' => true ]);
8080
8181 return new $ storeClass ($ connection );
Original file line number Diff line number Diff line change @@ -63,12 +63,14 @@ public function validConnections()
6363 }
6464 if (class_exists (\Memcached::class) && class_exists (AbstractAdapter::class)) {
6565 yield ['memcached://server.com ' , MemcachedStore::class];
66+ yield ['memcached:?host[localhost]&host[localhost:12345] ' , MemcachedStore::class];
6667 }
6768 if (class_exists (\Redis::class) && class_exists (AbstractAdapter::class)) {
6869 yield ['redis://localhost ' , RedisStore::class];
6970 yield ['redis://localhost?lazy=1 ' , RedisStore::class];
7071 yield ['redis://localhost?redis_cluster=1 ' , RedisStore::class];
7172 yield ['redis://localhost?redis_cluster=1&lazy=1 ' , RedisStore::class];
73+ yield ['redis:?host[localhost]&host[localhost:6379]&redis_cluster=1 ' , RedisStore::class];
7274 }
7375 if (class_exists (\PDO ::class)) {
7476 yield ['sqlite:/tmp/sqlite.db ' , PdoStore::class];
You can’t perform that action at this time.
0 commit comments