fix: Updated TreeBuilder contructor arguments

This commit is contained in:
Aerex 2022-02-23 20:59:44 -06:00
parent 50e9a4c621
commit 31822ab7e7
1 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
<?php <?php
namespace Aerex\BaikalStorage\Configs; namespace Aerex\BaikalStorage\Configs;
@ -21,9 +21,9 @@ class ConfigBuilder implements ConfigurationInterface {
} }
public function getConfigTreeBuilder() { public function getConfigTreeBuilder() {
$treeBuilder = new TreeBuilder(); $treeBuilder = new TreeBuilder('configs', 'array');
$rootNode = $treeBuilder->root('configs'); $rootNode = $treeBuilder->getRootNode();
$ref = $rootNode->children() $ref = $rootNode->children()
->arrayNode('general') ->arrayNode('general')
->children() ->children()
->arrayNode('logger') ->arrayNode('logger')
@ -35,12 +35,12 @@ class ConfigBuilder implements ConfigurationInterface {
->validate() ->validate()
->IfNotInArray(['DEBUG', 'INFO', 'NOTICE', 'WARNING', 'ERROR', 'CRITICAL', 'ALERT', 'EMERGENCY']) ->IfNotInArray(['DEBUG', 'INFO', 'NOTICE', 'WARNING', 'ERROR', 'CRITICAL', 'ALERT', 'EMERGENCY'])
->thenInvalid('Invalid log level %s') ->thenInvalid('Invalid log level %s')
->end() ->end()
->end() ->end()
->end() ->end()
->end() ->end()
->end() ->end()
->end() ->end()
->arrayNode('storages') ->arrayNode('storages')
->children(); ->children();
foreach ($this->configs as $config) { foreach ($this->configs as $config) {