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.
1 parent fe29aef commit 29b83efCopy full SHA for 29b83ef
DependencyInjection/Configuration.php
@@ -33,8 +33,13 @@ public function __construct(ContainerBuilder $container)
33
*/
34
public function getConfigTreeBuilder()
35
{
36
- $treeBuilder = new TreeBuilder();
37
- $root = $treeBuilder->root('translation');
+ $treeBuilder = new TreeBuilder('translation');
+ // Keep compatibility with symfony/config < 4.2
38
+ if (!method_exists($treeBuilder, 'getRootNode')) {
39
+ $root = $treeBuilder->root('translation');
40
+ } else {
41
+ $root = $treeBuilder->getRootNode();
42
+ }
43
44
$this->configsNode($root);
45
$this->addAutoTranslateNode($root);
0 commit comments