From 0812895fcf9825996c24c594c3cf0665fdacecf0 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Sat, 28 Mar 2026 15:20:38 -0700 Subject: [PATCH 1/3] Add Symfony major version matrix to CI tests Test each supported Symfony major version independently by adding matrix entries that run composer require to pin all Symfony dependencies to a specific major version before running tests. --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0206b7c..d4c0e66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: run: ./tools/vendor/bin/roave-backward-compatibility-check --from=3.0.0 tests: - name: Tests + name: Tests ${{ matrix.symfony && format('(Symfony {0})', matrix.symfony) || '' }} runs-on: ${{ matrix.os }} @@ -94,6 +94,9 @@ jobs: codecov: - false + symfony: + - "" + include: - os: ubuntu-latest php-version: "8.0" @@ -119,6 +122,26 @@ jobs: codecov: true php-ini-values: assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit_buffer_size=4096M, opcache.jit=1205 + - os: ubuntu-latest + php-version: "8.2" + dependencies: highest + symfony: "5" + + - os: ubuntu-latest + php-version: "8.2" + dependencies: highest + symfony: "6" + + - os: ubuntu-latest + php-version: "8.2" + dependencies: highest + symfony: "7" + + - os: ubuntu-latest + php-version: "8.2" + dependencies: highest + symfony: "8" + steps: - name: Checkout uses: actions/checkout@v2 @@ -167,6 +190,10 @@ jobs: if: matrix.dependencies == 'highest' run: composer update --no-ansi --no-interaction --no-progress + - name: Require Symfony ${{ matrix.symfony }} + if: matrix.symfony != '' + run: composer require --no-interaction --no-progress symfony/console:^${{ matrix.symfony }} + - name: Run tests with phpunit run: composer unit From 855404f6b376d3f79ad47d6eacc2a362ed2afc21 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Sat, 28 Mar 2026 15:37:27 -0700 Subject: [PATCH 2/3] Use appropriate PHP version for each Symfony version matrix entry Set PHP version per Symfony matrix entry to the higher of the Symfony minimum PHP requirement and the project minimum PHP requirement. Symfony 8 entries use PHP 8.5. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4c0e66..dab5dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,12 +123,12 @@ jobs: php-ini-values: assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit_buffer_size=4096M, opcache.jit=1205 - os: ubuntu-latest - php-version: "8.2" + php-version: "8.0" dependencies: highest symfony: "5" - os: ubuntu-latest - php-version: "8.2" + php-version: "8.1" dependencies: highest symfony: "6" @@ -138,7 +138,7 @@ jobs: symfony: "7" - os: ubuntu-latest - php-version: "8.2" + php-version: "8.5" dependencies: highest symfony: "8" From 0e986f178f37c5a4985f16c491990be6b90e556c Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Sat, 28 Mar 2026 15:43:40 -0700 Subject: [PATCH 3/3] Add --with-all-dependencies to Symfony version require --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dab5dec..8b59798 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,7 +192,7 @@ jobs: - name: Require Symfony ${{ matrix.symfony }} if: matrix.symfony != '' - run: composer require --no-interaction --no-progress symfony/console:^${{ matrix.symfony }} + run: composer require --no-interaction --no-progress --with-all-dependencies symfony/console:^${{ matrix.symfony }} - name: Run tests with phpunit run: composer unit