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 4cc4001 commit 585561f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ parameters:
ignoreErrors:
# Symfony DI
- '#Cannot call method scalarNode\(\) 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
8 changes: 2 additions & 6 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_matomo');

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

\assert($rootNode instanceof ArrayNodeDefinition);

$this->addHttpClientSection($rootNode);
Expand Down

0 comments on commit 585561f

Please sign in to comment.