File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,10 @@ public static function createHandler($connection): AbstractSessionHandler
56
56
if (!class_exists (AbstractAdapter::class)) {
57
57
throw new InvalidArgumentException (sprintf ('Unsupported DSN "%s". Try running "composer require symfony/cache". ' , $ this ->dsn ));
58
58
}
59
+ $ handlerClass = 0 === strpos ($ connection , 'memcached:// ' ) ? MemcachedSessionHandler::class : RedisSessionHandler::class;
59
60
$ connection = AbstractAdapter::createConnection ($ connection , ['lazy ' => true ]);
60
61
61
- return 0 === strpos ( $ connection , ' memcached:// ' ) ? new MemcachedSessionHandler ( $ connection ) : new RedisSessionHandler ($ connection );
62
+ return new $ handlerClass ($ connection );
62
63
63
64
case 0 === strpos ($ connection , 'pdo_oci:// ' ):
64
65
if (!class_exists (DriverManager::class)) {
You can’t perform that action at this time.
0 commit comments