From ff0d007faabc837583385b3c42654daaeb418e20 Mon Sep 17 00:00:00 2001 From: Gonzalo Alonso Date: Wed, 10 Mar 2021 17:55:08 -0300 Subject: [PATCH] #1 --- src/DependencyInjection/Configuration.php | 46 ++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index c13cc5e..6a93834 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -10,30 +10,34 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder('afip'); - $rootNode = $treeBuilder->getRootNode('parameters'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() - ->scalarNode('CUIT') - ->defaultValue(0) - ->end() - ->booleanNode('production') - ->defaultFalse() - ->end() - ->scalarNode('res_folder') - ->defaultValue('config/packages/afip_res/') - ->end() - ->scalarNode('ta_folder') - ->defaultValue('config/packages/afip_res/') - ->end() - ->scalarNode('cert') - ->defaultValue('cert') - ->end() - ->scalarNode('key') - ->defaultValue('key') - ->end() - ->scalarNode('passphrase') - ->defaultValue('') + ->arrayNode('parameters') + ->children() + ->scalarNode('CUIT') + ->defaultValue(0) + ->end() + ->booleanNode('production') + ->defaultFalse() + ->end() + ->scalarNode('res_folder') + ->defaultValue('config/packages/afip_res/') + ->end() + ->scalarNode('ta_folder') + ->defaultValue('config/packages/afip_res/') + ->end() + ->scalarNode('cert') + ->defaultValue('cert') + ->end() + ->scalarNode('key') + ->defaultValue('key') + ->end() + ->scalarNode('passphrase') + ->defaultValue('') + ->end() + ->end() ->end() ->end() ;