Skip to content

Commit

Permalink
Drop support for symfony 3 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 15, 2019
2 parents 08ddf20 + 05ff982 commit 30dfc3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
],
"require": {
"php": "^7.2",
"core23/lastfm-api": "^2.0 || dev-master",
"core23/lastfm-api": "^2.0",
"psr/http-client": "^1.0",
"psr/http-message": "^1.0",
"symfony/config": "^3.4 || ^4.2",
"symfony/dependency-injection": "^3.4 || ^4.2",
"symfony/config": "^4.2",
"symfony/dependency-injection": "^4.2",
"symfony/event-dispatcher-contracts": "^1.1",
"symfony/expression-language": "^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/routing": "^3.4 || ^4.2",
"symfony/twig-bridge": "^3.4 || ^4.2",
"symfony/expression-language": "^4.2",
"symfony/framework-bundle": "^4.2",
"symfony/http-foundation": "^4.2",
"symfony/http-kernel": "^4.2",
"symfony/routing": "^4.2",
"symfony/twig-bridge": "^4.2",
"twig/twig": "^2.4"
},
"require-dev": {
Expand Down
6 changes: 0 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ parameters:
ignoreErrors:
# Symfony DI
- '#Cannot call method scalarNode\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null.#'
- "/Call to function method_exists.. with 'Symfony.+' and 'getRootNode' will always evaluate to false./"

# Symfony Contracts
- '#Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) invoked with 2 parameters, 1 required.#'
Expand All @@ -20,8 +19,3 @@ parameters:
-
message: '#Property .*::\$.* has no typehint specified.#'
path: tests/

-
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 @@ -21,12 +21,8 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_lastfm');

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

\assert($rootNode instanceof ArrayNodeDefinition);

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

0 comments on commit 30dfc3e

Please sign in to comment.