Skip to content

Commit

Permalink
minor #324 Fix deprecation for symfony/config 4.2+ (Jibbarth)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fix deprecation for symfony/config 4.2+

Fix deprecation for symfony/config 4.2

Fixed the same way as in doctrine/DoctrineBundle#853

Commits
-------

560d03c Fix deprecation for symfony/config 4.2+
  • Loading branch information
weaverryan committed Dec 13, 2018
2 parents 1c995ad + 560d03c commit ac04799
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -21,8 +21,13 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('maker');
$treeBuilder = new TreeBuilder('maker');
if (\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('maker');
}

$rootNode
->children()
Expand Down

0 comments on commit ac04799

Please sign in to comment.