Skip to content

Commit

Permalink
add treebuilder version distinction
Browse files Browse the repository at this point in the history
  • Loading branch information
trilobit-gmbh committed Jul 15, 2021
1 parent e55a1f3 commit 9fe8400
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('trilobit_constants');
$treeBuilder
->getRootNode()

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
$rootNode = $treeBuilder->root('trilobit_constants');
}

$rootNode
->children()
->booleanNode('allow_html')
->defaultValue(false)
Expand Down

0 comments on commit 9fe8400

Please sign in to comment.