Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #72 from franmomu/fix_deprecation
Fix deprecation for symfony/config 4.2+
  • Loading branch information
eko committed Dec 13, 2018
2 parents 8a5a3a0 + aed52d0 commit 976a3e1
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 976a3e1

Please sign in to comment.