Skip to content

Commit

Permalink
[patch-1] Use BC layer for deprecation in symfony/config
Browse files Browse the repository at this point in the history
  • Loading branch information
Doqnach committed Dec 17, 2019
1 parent 9e10d15 commit 1e2428d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('qp_woohoolabs_yin');
$rootNode = $treeBuilder->getRootNode();

if (\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('qp_woohoolabs_yin');
}

$rootNode
->children()
Expand Down

0 comments on commit 1e2428d

Please sign in to comment.