Skip to content

Commit

Permalink
feat(LogBundle) symfony 4 support
Browse files Browse the repository at this point in the history
 * Fix dependency injection Root Node compatibility with symfony 4
  • Loading branch information
Yansell Rivas Diaz committed Aug 12, 2020
1 parent af3a1b5 commit 4785460
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('nti_log');
$treeBuilder = new TreeBuilder('nti_log');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
$rootNode = $treeBuilder->root('nti_log');
}

$rootNode
->children()
Expand Down

0 comments on commit 4785460

Please sign in to comment.