From 816539b1104254a96a638e3cf39b029c11c718ab Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 3 Jul 2012 11:35:02 +0200 Subject: [PATCH] [FrameworkBundle] Display an error message when 'session.auto_start' is used (deprecated) --- .../DependencyInjection/Configuration.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 220cf04ed1..1a86a16474 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -190,7 +190,16 @@ class Configuration implements ConfigurationInterface ->info('session configuration') ->canBeUnset() ->children() - ->booleanNode('auto_start')->info('DEPRECATED! Session starts on demand')->end() + ->booleanNode('auto_start') + ->info('DEPRECATED! Session starts on demand') + ->defaultNull() + ->beforeNormalization() + ->ifTrue(function($v) { return null !== $v; }) + ->then(function($v) { + throw new \RuntimeException('The auto_start setting is deprecated. Just remove it from your configuration file.'); + }) + ->end() + ->end() ->scalarNode('storage_id')->defaultValue('session.storage.native')->end() ->scalarNode('handler_id')->defaultValue('session.handler.native_file')->end() ->scalarNode('name')->end()