Skip to content

Commit

Permalink
added symfony 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
EdvinasPocius committed Jan 6, 2021
1 parent 719bd1f commit 13f3fa5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('evp_web_to_pay');
if (method_exists(TreeBuilder::class, 'getRootNode')) {
$treeBuilder = new TreeBuilder('evp_web_to_pay');
$rootNode = $treeBuilder->getRootNode();
} else {
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('evp_web_to_pay');
}

$rootNode
->children()
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webtopay/webtopay-bundle",
"description": "Symfony2 bundle for WebToPay provided services",
"description": "Symfony bundle for WebToPay provided services",
"minimum-stability": "dev",
"authors": [
{
Expand All @@ -9,7 +9,7 @@
}
],
"require": {
"symfony/symfony": "^2.6|^3.0|^4.0",
"symfony/symfony": "^2.6|^3.0|^4.0|^5.0",
"webtopay/libwebtopay": "1.6.*"
},
"autoload": {
Expand Down

0 comments on commit 13f3fa5

Please sign in to comment.