From 8e11aaa2f21d18912df2f33d66204272ddebb088 Mon Sep 17 00:00:00 2001 From: Drak Date: Fri, 17 Aug 2012 17:38:35 +0100 Subject: [PATCH] [FrameworkBundle] Allow to set null for the handler in NativeSessionStorage --- .../DependencyInjection/FrameworkExtension.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 35fd6b5182..d9eed7d87a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -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']);