Skip to content

Commit 902d2f3

Browse files
authored
Merge pull request #1 from stefantalen/bump-symfony-compatibility
Bump Symfony compatibility
2 parents e43a53e + d954586 commit 902d2f3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

DependencyInjection/Configuration.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ class Configuration implements ConfigurationInterface
1717
*/
1818
public function getConfigTreeBuilder()
1919
{
20-
$treeBuilder = new TreeBuilder();
21-
$rootNode = $treeBuilder->root('donato_path_well');
20+
$treeBuilder = new TreeBuilder('donato_path_well');
21+
// Keep compatibility with symfony/config < 4.2
22+
if (!method_exists($treeBuilder, 'getRootNode')) {
23+
$rootNode = $treeBuilder->root('donato_path_well');
24+
} else {
25+
$rootNode = $treeBuilder->getRootNode();
26+
}
2227

2328
$rootNode
2429
->children()

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
],
1212
"require": {
1313
"php": ">=5.4.16",
14-
"symfony/validator": ">=2.8",
15-
"symfony/framework-bundle": ">=2.8"
14+
"symfony/validator": "^2.8|^3.0|^4.0|^5.0",
15+
"symfony/framework-bundle": "^2.8|^3.0|^4.0|^5.0"
1616
},
1717
"autoload": {
1818
"psr-4": {

0 commit comments

Comments
 (0)