Skip to content

Commit

Permalink
Merge 9fef2b9 into 2fcef93
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 16, 2018
2 parents 2fcef93 + 9fef2b9 commit 8a8fa4e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -24,8 +24,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('sonata_translation');
$treeBuilder = new TreeBuilder('sonata_translation');

// Keep compatibility with symfony/config < 4.2
if (!\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root('sonata_translation');
} else {
$rootNode = $treeBuilder->getRootNode();
}

$rootNode
->children()
Expand Down

0 comments on commit 8a8fa4e

Please sign in to comment.