Skip to content

Commit

Permalink
Merge pull request #14 from Etrimi/deprecate_treebuilder_root
Browse files Browse the repository at this point in the history
Fix deprecate TreeBuilder::root
  • Loading branch information
ScullWM committed Oct 22, 2021
2 parents 75fabcc + a2d4b9d commit 6856643
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 @@ -18,8 +18,12 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('swm_mailhook');
$treeBuilder = new TreeBuilder('swm_mailhook');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
$rootNode = $treeBuilder->root('swm_mailhook');
}

$this->addConfig($rootNode);

Expand Down

0 comments on commit 6856643

Please sign in to comment.