Skip to content

Commit

Permalink
Drop support for symfony 3
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 7, 2019
1 parent 3f34ed3 commit 0ec939a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ matrix:
- stage: test
php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest"
- stage: test
php: 7.3
env: SYMFONY_VERSION=3.4.*
- stage: test
php: 7.3
env: SYMFONY_VERSION=4.2.*
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"php": "^7.2",
"knplabs/knp-menu": "^2.1",
"sonata-project/block-bundle": "^3.18",
"symfony/config": "^3.4 || ^4.2",
"symfony/dependency-injection": "^3.4 || ^4.2",
"symfony/expression-language": "^3.4 || ^4.2",
"symfony/framework-bundle": "^3.4 || ^4.2",
"symfony/http-kernel": "^3.4 || ^4.2",
"symfony/translation": "^3.4 || ^4.2"
"symfony/config": "^4.2",
"symfony/dependency-injection": "^4.2",
"symfony/expression-language": "^4.2",
"symfony/framework-bundle": "^4.2",
"symfony/http-kernel": "^4.2",
"symfony/translation": "^4.2"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.2",
Expand Down
7 changes: 3 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_menu');

// Keep compatibility with symfony/config < 4.2
$rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('core23_menu');
$rootNode = $treeBuilder->getRootNode();

\assert($rootNode instanceof ArrayNodeDefinition);

Expand Down Expand Up @@ -108,8 +107,8 @@ private function getPathNode(string $name = ''): NodeInterface
{
$treeBuilder = new TreeBuilder($name);

// Keep compatibility with symfony/config < 4.2
$definition = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root($name);
$definition = $treeBuilder->getRootNode();

\assert($definition instanceof ArrayNodeDefinition);

$this->buildPathNode($definition);
Expand Down

0 comments on commit 0ec939a

Please sign in to comment.