We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d91b0f1 + a08fd07 commit 8f629c2Copy full SHA for 8f629c2
src/DependencyInjection/Configuration.php
@@ -33,8 +33,13 @@ class Configuration implements ConfigurationInterface
33
*/
34
public function getConfigTreeBuilder()
35
{
36
- $treeBuilder = new TreeBuilder();
37
- $root = $treeBuilder->root('cmf_routing');
+ $treeBuilder = new TreeBuilder('cmf_routing');
+ if (method_exists($treeBuilder, 'getRootNode')) {
38
+ $root = $treeBuilder->getRootNode();
39
+ } else {
40
+ // BC layer for symfony/config 4.1 and older
41
+ $root = $treeBuilder->root('cmf_routing');
42
+ }
43
44
$this->addChainSection($root);
45
$this->addDynamicSection($root);
0 commit comments