Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Commit d8aa9ff

Browse files
committed
Fix deprecation in tree builder
1 parent 8b0d579 commit d8aa9ff

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,14 @@ public function getConfigTreeBuilder()
8787
{
8888
$self = $this;
8989
$builder = new TreeBuilder();
90-
$node = $builder->root('doctrine_cache', 'array');
90+
91+
if (\method_exists($builder, 'getRootNode')) {
92+
$node = $builder->getRootNode();
93+
} else {
94+
// BC layer for symfony/config 4.1 and oler
95+
$node = $builder->root('doctrine_cache');
96+
}
97+
9198
$normalization = function ($conf) use ($self, $builder) {
9299
$conf['type'] = isset($conf['type'])
93100
? $conf['type']

0 commit comments

Comments
 (0)