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)
69
69
case 'semaphore ' === $ connection :
70
70
return new SemaphoreStore ();
71
71
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: ' ):
75
75
if (!class_exists (AbstractAdapter::class)) {
76
76
throw new InvalidArgumentException (sprintf ('Unsupported DSN "%s". Try running "composer require symfony/cache". ' , $ connection ));
77
77
}
78
- $ storeClass = 0 === strpos ($ connection , 'memcached:// ' ) ? MemcachedStore::class : RedisStore::class;
78
+ $ storeClass = 0 === strpos ($ connection , 'memcached: ' ) ? MemcachedStore::class : RedisStore::class;
79
79
$ connection = AbstractAdapter::createConnection ($ connection , ['lazy ' => true ]);
80
80
81
81
return new $ storeClass ($ connection );
Original file line number Diff line number Diff line change @@ -63,12 +63,14 @@ public function validConnections()
63
63
}
64
64
if (class_exists (\Memcached::class) && class_exists (AbstractAdapter::class)) {
65
65
yield ['memcached://server.com ' , MemcachedStore::class];
66
+ yield ['memcached:?host[localhost]&host[localhost:12345] ' , MemcachedStore::class];
66
67
}
67
68
if (class_exists (\Redis::class) && class_exists (AbstractAdapter::class)) {
68
69
yield ['redis://localhost ' , RedisStore::class];
69
70
yield ['redis://localhost?lazy=1 ' , RedisStore::class];
70
71
yield ['redis://localhost?redis_cluster=1 ' , RedisStore::class];
71
72
yield ['redis://localhost?redis_cluster=1&lazy=1 ' , RedisStore::class];
73
+ yield ['redis:?host[localhost]&host[localhost:6379]&redis_cluster=1 ' , RedisStore::class];
72
74
}
73
75
if (class_exists (\PDO ::class)) {
74
76
yield ['sqlite:/tmp/sqlite.db ' , PdoStore::class];
You can’t perform that action at this time.
0 commit comments