From f85e17b64eb18c426583b924149a0aad36a77043 Mon Sep 17 00:00:00 2001 From: Jordi Date: Wed, 29 Jul 2020 09:47:12 +0200 Subject: [PATCH] Upgrade to Symfony 5.0 and Twig 3 --- composer.json | 17 ++++++++--------- phpstan-baseline.neon | 6 ++++++ phpstan.neon.dist | 6 +++--- 3 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 phpstan-baseline.neon diff --git a/composer.json b/composer.json index 8f091901..5dca6e57 100644 --- a/composer.json +++ b/composer.json @@ -22,23 +22,22 @@ } ], "require": { - "php": "^7.1", - "symfony/config": "^4.4", - "symfony/dependency-injection": "^4.4", - "symfony/http-foundation": "^4.4", - "symfony/http-kernel": "^4.4", + "php": "^7.2", + "symfony/config": "^4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/http-foundation": "^4.4 || ^5.0", + "symfony/http-kernel": "^4.4 || ^5.0", "symfony/intl": "^4.4 || ^5.0", "symfony/templating": "^4.4", - "twig/twig": "^2.9" + "twig/twig": "^2.9 || ^3.0" }, "conflict": { - "sonata-project/user-bundle": "<2.0 || >=5.0" + "sonata-project/user-bundle": "<3.6" }, "require-dev": { "matthiasnoback/symfony-dependency-injection-test": "^4.0", - "sonata-project/user-bundle": "^3.6 || ^4.0", "symfony/phpunit-bridge": "^5.1", - "symfony/security-core": "^4.4" + "symfony/security-core": "^4.4 || ^5.0" }, "config": { "sort-packages": true diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..c7895e8e --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Class Sonata\\\\UserBundle\\\\Model\\\\User not found\\.$#" + count: 2 + path: src/Timezone/UserBasedTimezoneDetector.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index a19e9a59..488316a7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,3 +1,6 @@ +includes: + - phpstan-baseline.neon + parameters: level: 1 @@ -9,6 +12,3 @@ parameters: excludes_analyse: - src/Test/AbstractWidgetTestCase.php - tests/bootstrap.php - - autoload_files: - - vendor/autoload.php