Skip to content

Commit

Permalink
Merge pull request #217 from mbabker/patch-1
Browse files Browse the repository at this point in the history
Update bundle configuration for Symfony 4.2 change
  • Loading branch information
excelwebzone committed Nov 30, 2018
2 parents 87955a6 + 26ed787 commit 110f85a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/DependencyInjection/Configuration.php
Expand Up @@ -16,8 +16,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ewz_recaptcha');
$treeBuilder = new TreeBuilder('ewz_recaptcha');

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('ewz_recaptcha');
}

$rootNode
->children()
Expand Down

0 comments on commit 110f85a

Please sign in to comment.