Restore compatibiltiy with symfony/config v5
This commit is contained in:
1 parent
0bb3d1f4d0
commit
d83fbb5451
1 file changed
+8
-2
@@ -20,8 +20,14 @@ final class Configuration implements ConfigurationInterface
|
||||
{
|
||||
public function getConfigTreeBuilder(): TreeBuilder
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('terminal42_password_validation');
|
||||
$treeBuilder = new TreeBuilder('terminal42_password_validation');
|
||||
|
||||
// Keep compatibility with symfony/config < 4.2
|
||||
if (method_exists($treeBuilder, 'getRootNode')) {
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
} else {
|
||||
$rootNode = $treeBuilder->root('terminal42_password_validation');
|
||||
}
|
||||
|
||||
$rootNode
|
||||
->useAttributeAsKey('entity')
|
||||
|
||||
Reference in new issue
Block a user