Skip to content

Commit

Permalink
[FrameworkBundle] adds deprecation notice on framework.csrf_protectio…
Browse files Browse the repository at this point in the history
…n.field_name configuration key.
  • Loading branch information
Hugo Hamon committed Jan 8, 2015
1 parent 66da1d2 commit d79d2cf
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -205,6 +205,7 @@ private function registerFormConfiguration($config, ContainerBuilder $container,
if (null !== $config['form']['csrf_protection']['field_name']) {
$container->setParameter('form.type_extension.csrf.field_name', $config['form']['csrf_protection']['field_name']);
} else {
trigger_error('The framework.csrf_protection.field_name configuration key is deprecated since version 2.4 and will be removed in 3.0. Use the framework.form.csrf_protection.field_name configuration key instead', E_USER_DEPRECATED);
$container->setParameter('form.type_extension.csrf.field_name', $config['csrf_protection']['field_name']);
}
} else {
Expand Down Expand Up @@ -299,7 +300,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
'memcached' => 'Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage',
'redis' => 'Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage',
);
list($class,) = explode(':', $config['dsn'], 2);
list($class, ) = explode(':', $config['dsn'], 2);
if (!isset($supported[$class])) {
throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class));
}
Expand Down

0 comments on commit d79d2cf

Please sign in to comment.