From 24495252a36a6ab694f37bbce8cecb42f418e3ab Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:01:20 +0100 Subject: [PATCH 01/15] feat: Allow php 8.1 and symfony 6.1 --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index cf9bca1..052fb4d 100644 --- a/composer.json +++ b/composer.json @@ -10,12 +10,12 @@ } ], "require": { - "php": "^7.2 || ^8.0", - "symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0", - "symfony/filesystem": "^4.4 || ^5.3 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0", - "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0", - "symfony/yaml": "^4.4 || ^5.3 || ^6.0" + "php": "^7.2 || ^8.0 || ^8.1", + "symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0 || ^6.1", + "symfony/filesystem": "^4.4 || ^5.3 || ^6.0 || ^6.1", + "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0 || ^6.1", + "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0 || ^6.1", + "symfony/yaml": "^4.4 || ^5.3 || ^6.0 || ^6.1" }, "require-dev": { "phpunit/phpunit": "^8.5 || ^9.4" From 94932d072209c69e24cf880d4ddc5e8a814dadef Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:01:48 +0100 Subject: [PATCH 02/15] ci: Set php to 8.1 for static workflow --- .github/workflows/static.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3957e37..b447cf4 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -13,7 +13,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 coverage: none tools: phpstan:0.12.94, cs2pr @@ -34,7 +34,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 coverage: none tools: php-cs-fixer:3, cs2pr @@ -51,7 +51,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 coverage: none tools: vimeo/psalm:4.8.1 @@ -69,7 +69,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: 8.1 coverage: none tools: composer-normalize From 77a129f88b78ec58224efb3a4999301b26917710 Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:02:12 +0100 Subject: [PATCH 03/15] ci: Add php 8.1 and symfony 6.1 to test workflow --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d15b31..17c694c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: - '7.3' - '7.4' - '8.0' + - '8.1' dependency: - '' - 'lowest' @@ -19,20 +20,27 @@ jobs: - '4.4.*' - '5.3.*' - '6.0.*' + - '6.1.*' exclude: - php: '7.2' symfony: '4.4.*' dependency: 'lowest' - php: '7.2' symfony: '6.0.*' + - php: '7.2' + symfony: '6.1.*' - php: '7.3' symfony: '4.4.*' - php: '7.3' symfony: '6.0.*' + - php: '7.3' + symfony: '6.1.*' - php: '7.4' symfony: '4.4.*' - php: '7.4' symfony: '6.0.*' + - php: '7.4' + symfony: '6.1.*' - php: '8.0' symfony: '4.4.*' fail-fast: false @@ -50,8 +58,8 @@ jobs: - name: Configure Symfony run: composer config extra.symfony.require "${{ matrix.symfony }}" - - name: Prefer unstable Composer dependencies if Symfony 6.0 - if: matrix.symfony == '6.0.*' + - name: Prefer unstable Composer dependencies if Symfony 6.1 + if: matrix.symfony == '6.1.*' run: composer config prefer-stable false - name: Get Composer Cache Directory From 96bff3555465c1d3209cc96e08e2a4180a61606c Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:09:11 +0100 Subject: [PATCH 04/15] Revert "ci: Set php to 8.1 for static workflow" This reverts commit 94932d072209c69e24cf880d4ddc5e8a814dadef. --- .github/workflows/static.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index b447cf4..3957e37 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -13,7 +13,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.0 coverage: none tools: phpstan:0.12.94, cs2pr @@ -34,7 +34,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.0 coverage: none tools: php-cs-fixer:3, cs2pr @@ -51,7 +51,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.0 coverage: none tools: vimeo/psalm:4.8.1 @@ -69,7 +69,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.0 coverage: none tools: composer-normalize From d0bf98cedc8fbd1a4876e7d99362cb37f7ae954b Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:19:32 +0100 Subject: [PATCH 05/15] ci: Update phpstan --- .github/workflows/static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3957e37..0025c38 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -15,7 +15,7 @@ jobs: with: php-version: 8.0 coverage: none - tools: phpstan:0.12.94, cs2pr + tools: phpstan:1.2.0, cs2pr - name: Download dependencies uses: ramsey/composer-install@v1 From f1143177a3dcca47d02cd82468a7e5f2867275e5 Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:19:41 +0100 Subject: [PATCH 06/15] ci: Update phpstan baseline --- phpstan-baseline.neon | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index bb603e8..cb0ea90 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,7 +1,17 @@ parameters: ignoreErrors: - - message: "#^Comparison operation \"\\>\\=\" between 50306 and 50100 is always true\\.$#" + message: "#^Call to method import\\(\\) on an unknown class Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#" + count: 1 + path: src/TestKernel.php + + - + message: "#^Parameter \\$routes of method Nyholm\\\\BundleTest\\\\TestKernel\\:\\:configureRoutes\\(\\) has invalid type Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#" + count: 1 + path: src/TestKernel.php + + - + message: "#^Comparison operation \"\\>\\=\" between 60000 and 50100 is always true\\.$#" count: 1 path: src/config/parameters.php From 425c5827ac18b46ab293b9cdac9c8f016999813f Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:19:46 +0100 Subject: [PATCH 07/15] ci: Update psalm baseline --- psalm.baseline.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 38f6696..dc27547 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -1,5 +1,10 @@ + + + RoutingConfigurator|RouteCollectionBuilder + + $container From 0e0e083a838b7e48d25f27d60bdcc87d0f7e5928 Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:34:09 +0100 Subject: [PATCH 08/15] ci: Add symfony 5.4 --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17c694c..3b3cef8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: symfony: - '4.4.*' - '5.3.*' + - '5.4.*' - '6.0.*' - '6.1.*' exclude: @@ -43,6 +44,12 @@ jobs: symfony: '6.1.*' - php: '8.0' symfony: '4.4.*' + - php: '8.1' + symfony: '4.4.*' + dependency: 'lowest' + - php: '8.1' + symfony: '5.3.*' + dependency: 'lowest' fail-fast: false steps: - name: Checkout From 98981b8c7a6a675a5e5201566770dbf215637c38 Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:35:20 +0100 Subject: [PATCH 09/15] fix: Add conflict with phpunit lower or equal to 8.5.14 Cause of GLOBALS access and compatibility with PHP 8.1 --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 052fb4d..24a0727 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,9 @@ "require-dev": { "phpunit/phpunit": "^8.5 || ^9.4" }, + "conflict": { + "phpunit/phpunit": "<=8.5.14" + }, "autoload": { "psr-4": { "Nyholm\\BundleTest\\": "src/" From 819df806d491854257aed600a839adeb2a611b0b Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:37:25 +0100 Subject: [PATCH 10/15] chore: fix order in composer --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 24a0727..2338808 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,12 @@ "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0 || ^6.1", "symfony/yaml": "^4.4 || ^5.3 || ^6.0 || ^6.1" }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.4" - }, "conflict": { "phpunit/phpunit": "<=8.5.14" }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.4" + }, "autoload": { "psr-4": { "Nyholm\\BundleTest\\": "src/" From 3379969667f9789b92d1403cf5e5d60e115c55cd Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 30 Nov 2021 20:39:49 +0100 Subject: [PATCH 11/15] chore: Update readme and changelog --- CHANGELOG.md | 2 ++ README.md | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 929f9fd..9c00c3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee - Support for multiple routing files via `TestKernel::addRoutingFile` - Support for a fully functional symfony kernel with the usage of the `Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait` - Cleanup of the cache and log directory after kernel shutdown +- Support for PHP 8.1 +- Support for Symfony 6.1 ### Removed diff --git a/README.md b/README.md index f49887f..dd189dc 100644 --- a/README.md +++ b/README.md @@ -102,8 +102,8 @@ jobs: strategy: matrix: operating-system: [ ubuntu-latest, windows-latest ] - php: [ '7.4', '8.0' ] - symfony: ['^4.4', '^5.3'] + php: [ '7.4', '8.0', '8.1' ] + symfony: ['^4.4', '^5.3', '^5.4', '^6.0', '^6.1'] steps: - uses: actions/checkout@master From 140e4b010cf6701861aabe5148eaaf8ab3686a97 Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 14 Dec 2021 12:24:17 +0100 Subject: [PATCH 12/15] docs: Update pipeline example in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd189dc..8023a16 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ jobs: matrix: operating-system: [ ubuntu-latest, windows-latest ] php: [ '7.4', '8.0', '8.1' ] - symfony: ['^4.4', '^5.3', '^5.4', '^6.0', '^6.1'] + symfony: ['4.4.*', '5.3.*', '5.4.*', '6.0.*', '6.1.*'] steps: - uses: actions/checkout@master From a48500116c33caa9e33bda9f16d938ab364d6182 Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 14 Dec 2021 12:25:39 +0100 Subject: [PATCH 13/15] fix: Update constraints in composer file --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 2338808..8d386c7 100644 --- a/composer.json +++ b/composer.json @@ -11,11 +11,11 @@ ], "require": { "php": "^7.2 || ^8.0 || ^8.1", - "symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0 || ^6.1", - "symfony/filesystem": "^4.4 || ^5.3 || ^6.0 || ^6.1", - "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0 || ^6.1", - "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0 || ^6.1", - "symfony/yaml": "^4.4 || ^5.3 || ^6.0 || ^6.1" + "symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0", + "symfony/filesystem": "^4.4 || ^5.3 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0", + "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0", + "symfony/yaml": "^4.4 || ^5.3 || ^6.0" }, "conflict": { "phpunit/phpunit": "<=8.5.14" From 6c91cd1adc15f261422b752be690fcfc15e56f0d Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 14 Dec 2021 12:27:32 +0100 Subject: [PATCH 14/15] fix: Normalize composer json --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 8d386c7..24651b6 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "nyholm/symfony-bundle-test", - "type": "library", "description": "", "license": "MIT", + "type": "library", "authors": [ { "name": "Tobias Nyholm", @@ -17,12 +17,14 @@ "symfony/http-kernel": "^4.4 || ^5.3 || ^6.0", "symfony/yaml": "^4.4 || ^5.3 || ^6.0" }, - "conflict": { - "phpunit/phpunit": "<=8.5.14" - }, "require-dev": { "phpunit/phpunit": "^8.5 || ^9.4" }, + "conflict": { + "phpunit/phpunit": "<=8.5.14" + }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Nyholm\\BundleTest\\": "src/" @@ -33,8 +35,6 @@ "Nyholm\\BundleTest\\Tests\\": "tests/" } }, - "minimum-stability": "dev", - "prefer-stable": true, "scripts": { "test": "vendor/bin/phpunit", "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml" From b32d4a8dd9d4345ed49af04b4f90240689c01b0b Mon Sep 17 00:00:00 2001 From: chapterjason Date: Tue, 14 Dec 2021 21:46:07 +0100 Subject: [PATCH 15/15] chore: Fix phpstan baseline --- phpstan-baseline.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index cb0ea90..6e924ad 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -11,7 +11,7 @@ parameters: path: src/TestKernel.php - - message: "#^Comparison operation \"\\>\\=\" between 60000 and 50100 is always true\\.$#" + message: "#^Comparison operation \"\\>\\=\" between 60001 and 50100 is always true\\.$#" count: 1 path: src/config/parameters.php