Skip to content

Commit

Permalink
[MINOR] Remove old symfony <4.2 code
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Nov 30, 2019
1 parent 8d2ac88 commit 248dfb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ parameters:

# Symfony DI
- '#Cannot call method end\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null.#'
- "/Call to function method_exists.. with 'Symfony.+' and 'getRootNode' will always evaluate to false./"

# PHPUnit
-
Expand Down
7 changes: 1 addition & 6 deletions src/Bridge/Symfony/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_doctrine');

// Keep compatibility with symfony/config < 4.2
if (!method_exists(TreeBuilder::class, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_doctrine');
} else {
$rootNode = $treeBuilder->getRootNode();
}
$rootNode = $treeBuilder->getRootNode();

\assert($rootNode instanceof ArrayNodeDefinition);

Expand Down

0 comments on commit 248dfb0

Please sign in to comment.