Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
[MINOR] Drop support for symfony < 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 2, 2019
1 parent 3b8e7e5 commit 406637a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 28 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
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
"psr/http-message": "^1.0",
"sonata-project/block-bundle": "^3.18",
"sonata-project/core-bundle": "^3.17",
"symfony/config": "^3.4 || ^4.2",
"symfony/dependency-injection": "^3.4 || ^4.2",
"symfony/expression-language": "^3.4 || ^4.2",
"symfony/form": "^3.4 || ^4.2",
"symfony/framework-bundle": "^3.4 || ^4.2",
"symfony/http-foundation": "^3.4 || ^4.2",
"symfony/http-kernel": "^3.4 || ^4.2",
"symfony/options-resolver": "^3.4 || ^4.2",
"symfony/twig-bundle": "^3.4 || ^4.2"
"symfony/config": "^4.2",
"symfony/dependency-injection": "^4.2",
"symfony/expression-language": "^4.2",
"symfony/form": "^4.2",
"symfony/framework-bundle": "^4.2",
"symfony/http-foundation": "^4.2",
"symfony/http-kernel": "^4.2",
"symfony/options-resolver": "^4.2",
"symfony/twig-bundle": "^4.2"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.3",
Expand Down
10 changes: 0 additions & 10 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,3 @@ parameters:
message: "#^Offset 'host' does not exist on array\\(\\)\\|array\\('scheme' \\=\\> string, 'host' \\=\\> string, 'port' \\=\\> int, 'user' \\=\\> string, 'pass' \\=\\> string, 'path' \\=\\> string, 'query' \\=\\> string, 'fragment' \\=\\> string\\)\\.$#"
count: 1
path: src/Backend/PsrBackend.php

-
message: "#^Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component…' and 'getRootNode' will always evaluate to false\\.$#"
count: 1
path: src/DependencyInjection/Configuration.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\TreeBuilder\\:\\:root\\(\\)\\.$#"
count: 1
path: src/DependencyInjection/Configuration.php
8 changes: 2 additions & 6 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_shariff');

// Keep compatibility with symfony/config < 4.2
if (!method_exists(TreeBuilder::class, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_shariff');
} else {
$rootNode = $treeBuilder->getRootNode();
}
$rootNode = $treeBuilder->getRootNode();

\assert($rootNode instanceof ArrayNodeDefinition);

$this->addAliases($rootNode);
Expand Down

0 comments on commit 406637a

Please sign in to comment.