Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dcf3da8

Browse filesBrowse files
committed
bug #35910 [SecurityBundle] Minor fixes in configuration tree builder (HeahDude)
This PR was merged into the 3.4 branch. Discussion ---------- [SecurityBundle] Minor fixes in configuration tree builder | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | ~ | License | MIT | Doc PR | ~ Commits ------- 1bd779d [SecurityBundle] Minor fixes in configuration tree builder
2 parents e0d1e34 + 1bd779d commit dcf3da8
Copy full SHA for dcf3da8

File tree

Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,14 @@ public function addConfiguration(NodeDefinition $node)
139139
->end()
140140
->prototype('scalar')->end()
141141
->end()
142-
->scalarNode('catch_exceptions')->defaultTrue()->end()
142+
->booleanNode('catch_exceptions')->defaultTrue()->end()
143143
;
144144

145145
foreach ($this->options as $name => $value) {
146146
if (\is_bool($value)) {
147147
$builder->booleanNode($name)->defaultValue($value);
148+
} elseif (\is_int($value)) {
149+
$builder->integerNode($name)->defaultValue($value);
148150
} else {
149151
$builder->scalarNode($name)->defaultValue($value);
150152
}

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/LdapFactory.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ public function getKey()
4747
public function addConfiguration(NodeDefinition $node)
4848
{
4949
$node
50+
->fixXmlConfig('default_role')
5051
->children()
5152
->scalarNode('service')->isRequired()->cannotBeEmpty()->defaultValue('ldap')->end()
5253
->scalarNode('base_dn')->isRequired()->cannotBeEmpty()->end()
53-
->scalarNode('search_dn')->end()
54-
->scalarNode('search_password')->end()
54+
->scalarNode('search_dn')->defaultNull()->end()
55+
->scalarNode('search_password')->defaultNull()->end()
5556
->arrayNode('default_roles')
5657
->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end()
5758
->requiresAtLeastOneElement()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.