diff --git a/composer.json b/composer.json index b8dc84a..29cb4a3 100644 --- a/composer.json +++ b/composer.json @@ -18,19 +18,19 @@ }, "require": { "php": "^7.1.3", + "symfony/config": "^4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/event-dispatcher-contracts": "^1.1 || ^2.1", + "symfony/http-kernel": "^4.4 || ^5.0", "symfony/property-access": "^4.4 || ^5.0", "m6web/statsd": "^1.3" }, "require-dev": { - "atoum/atoum": "^2.8|^3.0", + "atoum/atoum": "^2.8 || ^3.0", "m6web/coke": "~1.2", "m6web/symfony2-coding-standard": "~1.2", - "symfony/config": "^4.4 || ^5.0", "symfony/console": "^4.4 || ^5.0", - "symfony/dependency-injection": "^4.4 || ^5.0", - "symfony/event-dispatcher-contracts": "^1.1 || ^2.1", - "symfony/http-foundation": "^4.4 || ^5.0", - "symfony/http-kernel": "^4.4 || ^5.0" + "symfony/http-foundation": "^4.4 || ^5.0" }, "autoload": { "psr-4": { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 7576af8..5846290 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -18,14 +18,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - // symfony/config >= 4.2.0 - if (\method_exists(TreeBuilder::class, 'getRootNode')) { - $treeBuilder = new TreeBuilder('m6_statsd'); - $rootNode = $treeBuilder->getRootNode(); - } else { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('m6_statsd'); - } + $treeBuilder = new TreeBuilder('m6_statsd'); + $rootNode = $treeBuilder->getRootNode(); $this->addServersSection($rootNode); $this->addClientsSection($rootNode);