Skip to content
This repository has been archived by the owner on Jun 24, 2019. It is now read-only.

Commit

Permalink
Use asserts for type safe root config nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 27, 2018
1 parent 40454dc commit 93819ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bridge/Symfony/DependencyInjection/Configuration.php
Expand Up @@ -24,13 +24,13 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_monolog');

/* @var ArrayNodeDefinition $rootNode */
// Keep compatibility with symfony/config < 4.2
if (!\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_monolog');
} else {
$rootNode = $treeBuilder->getRootNode();
}
\assert($rootNode instanceof ArrayNodeDefinition);

$this->addLoggingSection($rootNode);

Expand Down

0 comments on commit 93819ec

Please sign in to comment.