[FrameworkBundle] Allow to set null for the handler in NativeSessionStorage
This commit is contained in:
parent
d3625b0c2b
commit
8e11aaa2f2
@ -294,7 +294,12 @@ class FrameworkExtension extends Extension
|
|||||||
$container->setParameter('session.storage.options', $options);
|
$container->setParameter('session.storage.options', $options);
|
||||||
|
|
||||||
// session handler (the internal callback registered with PHP session management)
|
// session handler (the internal callback registered with PHP session management)
|
||||||
$container->setAlias('session.handler', $config['handler_id']);
|
if (null == $config['handler_id']) {
|
||||||
|
// Set the handler class to be null
|
||||||
|
$container->getDefinition('session.storage.native')->replaceArgument(1, null);
|
||||||
|
} else {
|
||||||
|
$container->setAlias('session.handler', $config['handler_id']);
|
||||||
|
}
|
||||||
|
|
||||||
$container->setParameter('session.save_path', $config['save_path']);
|
$container->setParameter('session.save_path', $config['save_path']);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user