Skip to content

Commit

Permalink
Update getConfigTreeBuilder for forward-compatibility comur#123
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Thomas committed May 9, 2020
1 parent 95057f4 commit 7a54d8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('comur_image');
$treeBuilder = new TreeBuilder('comur_image');
$rootNode = method_exists($treeBuilder, "getRootNode")
? $treeBuilder->getRootNode()
: $treeBuilder->root('comur_image'); // BC layer for symfony/config 4.2 and older

$rootNode
->children()
Expand Down

0 comments on commit 7a54d8b

Please sign in to comment.