From e0700bdf38547ae05058885f15fe8944a6968369 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 5 Nov 2025 18:13:18 +0100 Subject: [PATCH 1/6] Switch to Flex to enforce specific Symfony versions --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1ea4d30..f4eb771 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,13 +20,13 @@ jobs: - '8.4' - '8.3' - '8.2' - symfony: [''] + symfony-version: [''] include: - php: '8.5' composer_options: '--ignore-platform-req=php+' - - symfony: '^7.3' + - symfony-version: '^7.3' php: '8.3' - - symfony: '^6.4' + - symfony-version: '^6.4' php: '8.2' - php: '8.2' dependencies: 'prefer-lowest' @@ -43,14 +43,14 @@ jobs: with: php-version: ${{ matrix.php }} coverage: xdebug - - name: Restrict Symfony version - run: composer require --dev "symfony/symfony:${{ matrix.symfony }}" --no-update - if: matrix.symfony + tools: flex - name: Install dependencies uses: "ramsey/composer-install@v3" with: composer-options: ${{ matrix.composer_options }} dependency-versions: "${{ matrix.dependencies }}" + env: + SYMFONY_REQUIRE: ${{ matrix.symfony-version }} - name: Run tests run: vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload code coverage From 731f6007690c8cc18adf049b15bfd20184a4cf13 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 5 Nov 2025 18:14:40 +0100 Subject: [PATCH 2/6] Test against Symfony 8 in CI --- .github/workflows/ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f4eb771..799e3ed 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,9 @@ jobs: include: - php: '8.5' composer_options: '--ignore-platform-req=php+' + - symfony-version: '^8.0.0-BETA1' + composer-minimum-stability: 'beta' + php: '8.4' - symfony-version: '^7.3' php: '8.3' - symfony-version: '^6.4' @@ -44,6 +47,9 @@ jobs: php-version: ${{ matrix.php }} coverage: xdebug tools: flex + - name: Configure Composer minimum-stability + if: matrix.composer-minimum-stability + run: composer config minimum-stability ${{ matrix.composer-minimum-stability }} - name: Install dependencies uses: "ramsey/composer-install@v3" with: From 6221fe02dcf3b527b3c9bdf9bdb63016ffe76d02 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 5 Nov 2025 18:15:32 +0100 Subject: [PATCH 3/6] Fix CI jobs description --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 799e3ed..740cb41 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ on: jobs: Tests: - name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony }}${{ matrix.description }} + name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-version }}${{ matrix.description }} runs-on: ubuntu-latest env: SYMFONY_DEPRECATIONS_HELPER: 'max[self]=0' From f6967ce69ece2749c6f91dd410e9d1508277cfc6 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 5 Nov 2025 18:17:39 +0100 Subject: [PATCH 4/6] Drop Psalm during CI tests --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 740cb41..ccd7dc6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,6 +50,8 @@ jobs: - name: Configure Composer minimum-stability if: matrix.composer-minimum-stability run: composer config minimum-stability ${{ matrix.composer-minimum-stability }} + - name: Remove Composer unneeded dependencies + run: composer remove --dev --no-update vimeo/psalm psalm/plugin-phpunit facile-it/facile-coding-standard - name: Install dependencies uses: "ramsey/composer-install@v3" with: From eac3a427e27095a39436354f5f508b9f33667324 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 5 Nov 2025 18:18:53 +0100 Subject: [PATCH 5/6] Allow Symfony 8 --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index c6a81e4..76a3e6a 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "require": { "php": "^8.2", "ext-pcntl": "*", - "symfony/console": "^6.4 || ^7.0" + "symfony/console": "^6.4 || ^7.0 || ^8.0" }, "require-dev": { "facile-it/facile-coding-standard": "^1.2", @@ -46,8 +46,8 @@ "psalm/plugin-phpunit": "0.19.3", "rector/rector": "2.2.7", "shipmonk/composer-dependency-analyser": "^1.8", - "symfony/phpunit-bridge": "^6.4 || ^7.0", - "symfony/process": "^6.4 || ^7.0", + "symfony/phpunit-bridge": "^6.4 || ^7.0 || ^8.0", + "symfony/process": "^6.4 || ^7.0 || ^8.0", "vimeo/psalm": "^6" } } From 192cbcbce4c4629eca81d36630b17a2ec05543d2 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Wed, 5 Nov 2025 21:27:36 +0100 Subject: [PATCH 6/6] Make stub compatible with Symfony 8 --- tests/Stub/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Stub/console b/tests/Stub/console index 40e6375..f7fa277 100755 --- a/tests/Stub/console +++ b/tests/Stub/console @@ -14,5 +14,5 @@ require __DIR__.'/../../vendor/autoload.php'; $input = new ArgvInput(); $application = new Application('Stub application'); -$application->add(new StubTerminableCommand()); +$application->addCommands([new StubTerminableCommand()]); $application->run($input);