Skip to content

Commit

Permalink
Merge pull request #8 from Regelwerk/remove-deprecation
Browse files Browse the repository at this point in the history
Remove deprecation message: A tree builder without a root node is depr…
  • Loading branch information
Chester authored Feb 10, 2019
2 parents f758125 + 55fa11b commit dd4410f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$builder = new TreeBuilder();
$builder->root('yectep_phpoffice');
if (! method_exists('Symfony\Component\Config\Definition\Builder\TreeBuilder', 'getRootNode')) {
// This is the pre 4.2 way
$builder = new TreeBuilder();
$builder->root('yectep_phpoffice');
} else {
$builder = new TreeBuilder('yectep_phpoffice');
$builder->getRootNode($builder, 'yectep_phpoffice');
}


return $builder;
}

}
}

0 comments on commit dd4410f

Please sign in to comment.