Fixed deprecated TreeBuilder::root method call in SF 4
This commit is contained in:
parent
be1ce45060
commit
1b4835eb4d
|
@ -14,8 +14,14 @@ class Configuration implements ConfigurationInterface
|
||||||
*/
|
*/
|
||||||
public function getConfigTreeBuilder()
|
public function getConfigTreeBuilder()
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder();
|
$treeBuilder = new TreeBuilder('gregwar_captcha');
|
||||||
$rootNode = $treeBuilder->root('gregwar_captcha');
|
|
||||||
|
if (method_exists($treeBuilder, 'getRootNode')) {
|
||||||
|
$rootNode = $treeBuilder->getRootNode();
|
||||||
|
} else {
|
||||||
|
// BC for symfony/config <= 4.1
|
||||||
|
$rootNode = $treeBuilder->root('gregwar_captcha');
|
||||||
|
}
|
||||||
|
|
||||||
$rootNode
|
$rootNode
|
||||||
->addDefaultsIfNotSet()
|
->addDefaultsIfNotSet()
|
||||||
|
|
Loading…
Reference in New Issue