[FrameworkBundle] Allow to set null for the handler in NativeSessionStorage

This commit is contained in:
Drak 2012-08-17 17:38:35 +01:00
parent d3625b0c2b
commit 8e11aaa2f2
1 changed files with 6 additions and 1 deletions

View File

@ -294,7 +294,12 @@ class FrameworkExtension extends Extension
$container->setParameter('session.storage.options', $options);
// 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']);