Skip to content

Commit

Permalink
Fix deprecation for symfony/config 4.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 13, 2018
1 parent 8a5a3a0 commit aed52d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DependencyInjection/Configuration.php
Expand Up @@ -29,8 +29,13 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('eko_feed');
$treeBuilder = new TreeBuilder('eko_feed');

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

$rootNode
->children()
Expand Down

0 comments on commit aed52d0

Please sign in to comment.