]> Raphaël G. Git Repositories - userbundle/commitdiff
Transform default scalar prototype in variable prototype to allow custom defaults 0.2.0
authorRaphaël Gertz <git@rapsys.eu>
Wed, 15 Sep 2021 15:34:49 +0000 (17:34 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 15 Sep 2021 15:34:49 +0000 (17:34 +0200)
DependencyInjection/Configuration.php

index ade173ffef0f0dc305b4905314a8b39af5c23737..3ceb22ff5dc46648e9f9ce98c4dbea92d8bc8725 100644 (file)
@@ -148,15 +148,9 @@ class Configuration implements ConfigurationInterface {
                                                ->scalarPrototype()->end()
                                        ->end()
                                        ->arrayNode('default')
-                                               ->addDefaultsIfNotSet()
-                                               ->children()
-                                                       ->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['default']['civility'])->end()
-                                                       ->arrayNode('group')
-                                                               ->treatNullLike([])
-                                                               ->defaultValue($defaults['default']['group'])
-                                                               ->scalarPrototype()->end()
-                                                       ->end()
-                                               ->end()
+                                               ->treatNullLike([])
+                                               ->defaultValue($defaults['default'])
+                                               ->variablePrototype()->end()
                                        ->end()
                                        ->arrayNode('route')
                                                ->addDefaultsIfNotSet()