From 9eb04cb74ee854ad1520271e1507734a0e57d843 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 1 Feb 2024 04:20:33 +0100 Subject: [PATCH] Move configuration under rapsys_air key --- DependencyInjection/Configuration.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 9be5f15..3c66467 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -15,7 +15,7 @@ class Configuration implements ConfigurationInterface { * {@inheritdoc} */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder('parameters'); + $treeBuilder = new TreeBuilder('rapsys_air'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for @@ -39,15 +39,10 @@ class Configuration implements ConfigurationInterface { ->getRootNode() ->addDefaultsIfNotSet() ->children() - ->arrayNode('rapsys_air') - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('logo')->defaultValue($defaults['logo'])->treatNullLike($defaults['logo'])->isRequired()->end() - ->scalarNode('title')->defaultValue($defaults['title'])->treatNullLike($defaults['title'])->isRequired()->end() - ->scalarNode('contact_name')->defaultValue($defaults['contact_name'])->treatNullLike($defaults['contact_name'])->isRequired()->end() - ->scalarNode('contact_mail')->defaultValue($defaults['contact_mail'])->treatNullLike($defaults['contact_mail'])->isRequired()->end() - ->end() - ->end() + ->scalarNode('logo')->defaultValue($defaults['logo'])->treatNullLike($defaults['logo'])->cannotBeEmpty()->end() + ->scalarNode('title')->defaultValue($defaults['title'])->treatNullLike($defaults['title'])->cannotBeEmpty()->end() + ->scalarNode('contact_name')->defaultValue($defaults['contact_name'])->treatNullLike($defaults['contact_name'])->cannotBeEmpty()->end() + ->scalarNode('contact_mail')->defaultValue($defaults['contact_mail'])->treatNullLike($defaults['contact_mail'])->cannotBeEmpty()->end() ->end() ->end(); -- 2.41.1