From 1bd779d7c801d2fb56d16f479ca7d41c19185c44 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Sat, 29 Feb 2020 22:44:21 +0100 Subject: [PATCH] [SecurityBundle] Minor fixes in configuration tree builder --- .../Security/Factory/RememberMeFactory.php | 4 +++- .../Security/UserProvider/LdapFactory.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php index 8d419c0edd8f0..89953502ba764 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php @@ -139,12 +139,14 @@ public function addConfiguration(NodeDefinition $node) ->end() ->prototype('scalar')->end() ->end() - ->scalarNode('catch_exceptions')->defaultTrue()->end() + ->booleanNode('catch_exceptions')->defaultTrue()->end() ; foreach ($this->options as $name => $value) { if (\is_bool($value)) { $builder->booleanNode($name)->defaultValue($value); + } elseif (\is_int($value)) { + $builder->integerNode($name)->defaultValue($value); } else { $builder->scalarNode($name)->defaultValue($value); } diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php index f213a32f8b7dc..35681623ed299 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php @@ -47,11 +47,12 @@ public function getKey() public function addConfiguration(NodeDefinition $node) { $node + ->fixXmlConfig('default_role') ->children() ->scalarNode('service')->isRequired()->cannotBeEmpty()->defaultValue('ldap')->end() ->scalarNode('base_dn')->isRequired()->cannotBeEmpty()->end() - ->scalarNode('search_dn')->end() - ->scalarNode('search_password')->end() + ->scalarNode('search_dn')->defaultNull()->end() + ->scalarNode('search_password')->defaultNull()->end() ->arrayNode('default_roles') ->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end() ->requiresAtLeastOneElement() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy