Skip to content

Commit

Permalink
refactor: Remove deprecation support.
Browse files Browse the repository at this point in the history
We are taking advantage of bumping to a major version to remove deprecation support.
From version 5.5 of sensio/framework-extra-bundle the Symfony Config component has a minimal version of 4.3.
Which means `getRootNode()` function is available.

Related to #21.
  • Loading branch information
qpautrat committed Dec 23, 2019
1 parent 95f7493 commit 328b36b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": "^7.1.0",
"psr/http-factory": "^1.0",
"sensio/framework-extra-bundle": "^5.4",
"sensio/framework-extra-bundle": "^5.5",
"symfony/psr-http-message-bridge": "^1.2",
"woohoolabs/yin": "^4.0"
},
Expand Down
8 changes: 1 addition & 7 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('qp_woohoolabs_yin');

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

$rootNode
->children()
Expand Down

0 comments on commit 328b36b

Please sign in to comment.