From 05015377ea86766b7d2a8ad3754dd62827d4ac87 Mon Sep 17 00:00:00 2001 From: core23 Date: Thu, 21 Nov 2019 21:09:30 +0100 Subject: [PATCH 1/3] Add support for symfony 5 --- composer.json | 22 +++++++++++----------- phpstan.neon.dist | 5 ----- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index 44661e3e..aa121da8 100644 --- a/composer.json +++ b/composer.json @@ -31,22 +31,22 @@ "psr/http-message": "^1.0", "sonata-project/block-bundle": "^4.0", "sonata-project/form-extensions": "^1.0", - "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" + "symfony/config": "^4.2 || ^5.0", + "symfony/dependency-injection": "^4.2 || ^5.0", + "symfony/expression-language": "^4.2 || ^5.0", + "symfony/form": "^4.2 || ^5.0", + "symfony/framework-bundle": "^4.2 || ^5.0", + "symfony/http-foundation": "^4.2 || ^5.0", + "symfony/http-kernel": "^4.2 || ^5.0", + "symfony/options-resolver": "^4.2 || ^5.0", + "symfony/twig-bundle": "^4.2 || ^5.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.3", "localheinz/composer-normalize": "^1.3", "nyholm/psr7": "^1.0", - "symfony/cache": "^3.4 || ^4.2", - "symfony/http-client": "^3.4 || ^4.2" + "symfony/cache": "^4.2 || ^5.0", + "symfony/http-client": "^4.2 || ^5.0" }, "config": { "sort-packages": true diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 964b8d07..f251ef0d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -22,11 +22,6 @@ parameters: count: 1 path: src/Backend/PsrBackend.php - - - message: "#^Call to an undefined method Twig\\\\Environment::expects\\(\\)\\.$#" - count: 1 - path: tests/Block/Service/ShariffShareBlockServiceTest.php - - message: "#^PHPDoc tag @throws with type Psr\\\\Cache\\\\InvalidArgumentException is not subtype of Throwable$#" count: 1 From 0bfae77ac446eb199852dc284b6c8d1a8d62731b Mon Sep 17 00:00:00 2001 From: core23 Date: Wed, 11 Dec 2019 19:01:11 +0100 Subject: [PATCH 2/3] Add symfony version lock to matrix build --- .github/settings.yml | 12 ++++++++---- .github/workflows/continuous-integration.yml | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 415f20c8..2b55a978 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -16,10 +16,14 @@ branches: contexts: - "Coding Standards (7.4)" - "Static Code Analysis (7.4)" - - "Tests (7.3, lowest)" - - "Tests (7.3, highest)" - - "Tests (7.4, lowest)" - - "Tests (7.4, highest)" + - "Tests (7.3, lowest, ~4.2)" + - "Tests (7.3, lowest, ~5.0)" + - "Tests (7.3, highest, ~4.2)" + - "Tests (7.3, highest, ~5.0)" + - "Tests (7.4, lowest, ~4.2)" + - "Tests (7.4, lowest, ~5.0)" + - "Tests (7.4, highest, ~4.2)" + - "Tests (7.4, highest, ~5.0)" - "Code Coverage (7.4)" - "Mutation Tests (7.4)" - "Mutation Tests (7.4)" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a3f1774c..067ce5c1 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -113,6 +113,10 @@ jobs: - lowest - highest + symfony: + - ~4.2 + - ~5.0 + steps: - name: "Checkout" uses: actions/checkout@v1 @@ -132,6 +136,9 @@ jobs: restore-keys: | php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + - name: "Lock symfony version" + run: composer require "symfony/symfony:${{ matrix.symfony }}" --no-update + - name: "Install lowest dependencies with composer" if: matrix.dependencies == 'lowest' run: composer update --no-interaction --no-progress --no-suggest --prefer-lowest From 14aad37c07b1b86c791293c27df8093f78fb7219 Mon Sep 17 00:00:00 2001 From: core23 Date: Tue, 17 Dec 2019 17:38:15 +0100 Subject: [PATCH 3/3] Remove doctrine cache bundle --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index aa121da8..18a16db5 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,6 @@ "require": { "php": "^7.3", "ext-json": "*", - "doctrine/doctrine-cache-bundle": "^1.3.5", "psr/cache": "^1.0", "psr/http-client": "^1.0", "psr/http-message": "^1.0",