Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Fix method change (#12)
Browse files Browse the repository at this point in the history
* Fix method change to support SF 3.4 and 4.*
  • Loading branch information
SebTM authored Dec 22, 2019
1 parent eb8c282 commit 58716df
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,28 @@

class Configuration implements ConfigurationInterface
{
protected const ROOT_NODE = 'inwx_api';

public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('inwx_api');
$treeBuilder = new TreeBuilder(self::ROOT_NODE);

$root = \method_exists($treeBuilder, 'getRootNode') ?
$treeBuilder->getRootNode() :
$treeBuilder->root(self::ROOT_NODE);

$treeBuilder
->getRootNode()
$root
->children()
->booleanNode('debug')
->defaultFalse()
->end()
->enumNode('environment')
->values(
array(
'production',
'development',
)
)
array(
'production',
'development',
)
)
->defaultValue('development')
->end()
->booleanNode('json')
Expand Down

0 comments on commit 58716df

Please sign in to comment.