]> Raphaël G. Git Repositories - userbundle/commitdiff
Change class to anonymous array to allow extra classes
authorRaphaël Gertz <git@rapsys.eu>
Sun, 8 Aug 2021 17:44:44 +0000 (19:44 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Sun, 8 Aug 2021 17:44:44 +0000 (19:44 +0200)
DependencyInjection/Configuration.php

index b22d973cfb6d1fdd227c10b8d1f1fc0ff3f0d182..4d2d3bf2c1a3f7c9e160a2b9edd87d6c5414aa49 100644 (file)
@@ -138,12 +138,9 @@ class Configuration implements ConfigurationInterface {
                                ->addDefaultsIfNotSet()
                                ->children()
                                        ->arrayNode('class')
                                ->addDefaultsIfNotSet()
                                ->children()
                                        ->arrayNode('class')
-                                               ->addDefaultsIfNotSet()
-                                               ->children()
-                                                       ->scalarNode('group')->cannotBeEmpty()->defaultValue($defaults['class']['group'])->end()
-                                                       ->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['class']['civility'])->end()
-                                                       ->scalarNode('user')->cannotBeEmpty()->defaultValue($defaults['class']['user'])->end()
-                                               ->end()
+                                               ->treatNullLike([])
+                                               ->defaultValue($defaults['class'])
+                                               ->scalarPrototype()->end()
                                        ->end()
                                        ->arrayNode('default')
                                                ->addDefaultsIfNotSet()
                                        ->end()
                                        ->arrayNode('default')
                                                ->addDefaultsIfNotSet()