From 9f8939c7c24b8f1eef139ea87555f57e04a291c5 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 18:32:01 +0400 Subject: [PATCH 1/7] ci: run the test suite on PHP 8.1 Add an 8.1 leg to the testing matrix. The library already targets 8.1, but its dev tooling (testo above all) is written for 8.2+, so the leg drops the tools the suite does not need and then uses php-internal/actions/install-php to resolve the rest as if on 8.1 and downgrade whatever has no 8.1-compatible version. Assisted-By: Claude Opus 4.8 (1M context) --- .github/workflows/testing.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 12ee9d7..75b9917 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -25,6 +25,7 @@ jobs: os: - ubuntu-latest php-version: + - '8.1' - '8.2' - '8.3' - '8.4' @@ -52,9 +53,25 @@ jobs: run: composer remove --dev infection/infection --no-update --no-interaction - name: ๐Ÿ“ฅ Install dependencies with composer + if: matrix.php-version != '8.1' uses: ramsey/composer-install@v3 with: dependency-versions: ${{ matrix.dependencies }} + # The library targets 8.1, but its dev tooling โ€” testo above all โ€” is written for 8.2+. + # Drop the tools the suite does not need, then install-php resolves the rest as if on 8.1 + # (so Composer picks 8.1-compatible versions) and downgrades whatever has no such version. + - name: ๐Ÿงน Slim dev tooling for the PHP 8.1 leg + if: matrix.php-version == '8.1' + run: composer remove --dev vimeo/psalm spiral/code-style roxblnfk/unpoly buggregator/trap testo/bridge-infection --no-update --no-interaction + + - name: ๐Ÿ“ฅ Install and downgrade for PHP 8.1 + if: matrix.php-version == '8.1' + uses: php-internal/actions/install-php@v1 + with: + php-version: '8.1' + dependency-versions: lowest + paths: testo.php + - name: ๐Ÿงช Run tests run: composer test From 84dd7f69c56f1b26d6cd7141586b047b46bf07de Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 18:49:50 +0400 Subject: [PATCH 2/7] ci: resolve the 8.1 leg at highest and slim the skills plugin Use the matrix dependency set (highest) rather than lowest on the 8.1 leg: install-php pins the platform, so Composer already caps every dependency to its newest 8.1-compatible version and downgrades only what has none. Drop llm/skills too (a Composer plugin whose hook is written for 8.2+), and raise the job timeout since downgrading the testo package set takes longer than the 8.2+ legs. Assisted-By: Claude Opus 4.8 (1M context) --- .github/workflows/testing.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 75b9917..852d68b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ on: # yamllint disable-line rule:truthy jobs: testing: - timeout-minutes: 4 + timeout-minutes: 15 runs-on: ${{ matrix.os }} env: COMPOSER_ROOT_VERSION: '1.x-dev' @@ -58,20 +58,20 @@ jobs: with: dependency-versions: ${{ matrix.dependencies }} - # The library targets 8.1, but its dev tooling โ€” testo above all โ€” is written for 8.2+. - # Drop the tools the suite does not need, then install-php resolves the rest as if on 8.1 - # (so Composer picks 8.1-compatible versions) and downgrades whatever has no such version. + # The library targets 8.1, but its dev tooling is written for 8.2+. Drop the tools the suite + # does not need (linters, mutation testing, the skills plugin), then install-php resolves the + # rest as if on 8.1 (so Composer picks 8.1-compatible versions) and downgrades what testo and + # friends have no 8.1 version for. - name: ๐Ÿงน Slim dev tooling for the PHP 8.1 leg if: matrix.php-version == '8.1' - run: composer remove --dev vimeo/psalm spiral/code-style roxblnfk/unpoly buggregator/trap testo/bridge-infection --no-update --no-interaction + run: composer remove --dev vimeo/psalm spiral/code-style roxblnfk/unpoly buggregator/trap testo/bridge-infection llm/skills --no-update --no-interaction - name: ๐Ÿ“ฅ Install and downgrade for PHP 8.1 if: matrix.php-version == '8.1' uses: php-internal/actions/install-php@v1 with: php-version: '8.1' - dependency-versions: lowest - paths: testo.php + dependency-versions: ${{ matrix.dependencies }} - name: ๐Ÿงช Run tests run: composer test From 72ea9a4dbbbc7406880ad3fe0fa7d4813d29658e Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 19:29:03 +0400 Subject: [PATCH 3/7] ci: skip testo's unparseable IDE stubs on the 8.1 downgrade testo/bridge-symfony-console ships a deliberately unparseable stub under resources/stubs, which Rector cannot process. Pass it to install-php's skip so the downgrade leaves those stubs alone. Assisted-By: Claude Opus 4.8 (1M context) --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 852d68b..51b16d6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -72,6 +72,8 @@ jobs: with: php-version: '8.1' dependency-versions: ${{ matrix.dependencies }} + # testo ships intentionally unparseable IDE stubs; they are not real code to downgrade. + skip: '*/resources/stubs/*' - name: ๐Ÿงช Run tests run: composer test From 10767f55f1e2c421fa7094868ebd7f5efdb007bb Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 19:33:04 +0400 Subject: [PATCH 4/7] ci: downgrade the test harness for the 8.1 leg The test stubs use 8.2 standalone types (e.g. `: false`), so the suite cannot load on 8.1 as written. Downgrade tests and the testo config via install-php's paths, but leave src alone so the shipped library is still exercised on 8.1 as-is. Assisted-By: Claude Opus 4.8 (1M context) --- .github/workflows/testing.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 51b16d6..31a5307 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -72,6 +72,9 @@ jobs: with: php-version: '8.1' dependency-versions: ${{ matrix.dependencies }} + # Downgrade the test harness (which uses 8.2+ syntax) and the testo config, but not src: + # the shipped library must be exercised on 8.1 as written. + paths: tests testo.php # testo ships intentionally unparseable IDE stubs; they are not real code to downgrade. skip: '*/resources/stubs/*' From 99847577f6fc17eaab7da251c3942049489f90b6 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 23:35:41 +0400 Subject: [PATCH 5/7] ci: point the 8.1 leg at the renamed downgrade action php-internal/actions/install-php was renamed to .../downgrade. Assisted-By: Claude Opus 4.8 (1M context) --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 31a5307..0713d91 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -59,7 +59,7 @@ jobs: dependency-versions: ${{ matrix.dependencies }} # The library targets 8.1, but its dev tooling is written for 8.2+. Drop the tools the suite - # does not need (linters, mutation testing, the skills plugin), then install-php resolves the + # does not need (linters, mutation testing, the skills plugin), then the downgrade action resolves the # rest as if on 8.1 (so Composer picks 8.1-compatible versions) and downgrades what testo and # friends have no 8.1 version for. - name: ๐Ÿงน Slim dev tooling for the PHP 8.1 leg @@ -68,7 +68,7 @@ jobs: - name: ๐Ÿ“ฅ Install and downgrade for PHP 8.1 if: matrix.php-version == '8.1' - uses: php-internal/actions/install-php@v1 + uses: php-internal/actions/downgrade@v1 with: php-version: '8.1' dependency-versions: ${{ matrix.dependencies }} From ce19a961a8dc7fcbc66a5c8950953b51f8cc995c Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 23:51:55 +0400 Subject: [PATCH 6/7] ci: stop dropping llm/skills on the 8.1 leg The downgrade action installs with --no-scripts, so llm/skills no longer fires its post-install hooks; removing it beforehand was unnecessary. Trim the slim step to the heavy dev tooling that is genuinely not needed to run the suite, and tighten the comment. Assisted-By: Claude Opus 4.8 (1M context) --- .github/workflows/testing.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0713d91..8d79455 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -58,13 +58,11 @@ jobs: with: dependency-versions: ${{ matrix.dependencies }} - # The library targets 8.1, but its dev tooling is written for 8.2+. Drop the tools the suite - # does not need (linters, mutation testing, the skills plugin), then the downgrade action resolves the - # rest as if on 8.1 (so Composer picks 8.1-compatible versions) and downgrades what testo and - # friends have no 8.1 version for. + # The dev tooling (linters, mutation testing) targets 8.2+ and isn't needed to run the suite; + # dropping it keeps the 8.1 downgrade surface small. - name: ๐Ÿงน Slim dev tooling for the PHP 8.1 leg if: matrix.php-version == '8.1' - run: composer remove --dev vimeo/psalm spiral/code-style roxblnfk/unpoly buggregator/trap testo/bridge-infection llm/skills --no-update --no-interaction + run: composer remove --dev vimeo/psalm spiral/code-style buggregator/trap testo/bridge-infection --no-update --no-interaction - name: ๐Ÿ“ฅ Install and downgrade for PHP 8.1 if: matrix.php-version == '8.1' From 3677b47af2ba0aa8b0656f7d993ac633084b2464 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 8 Sep 2026 23:54:14 +0400 Subject: [PATCH 7/7] ci: remove unused libraries for testing --- .github/workflows/testing.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8d79455..d1ccaf8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -47,10 +47,9 @@ jobs: - name: ๐Ÿค– Validate composer.json and composer.lock run: composer validate --ansi --strict - # Infection is dev-only and requires PHP >= 8.3, which breaks installation - # on the 8.2 matrix leg. It is not needed to run the test suite. + # Remove unused libs - name: ๐Ÿงน Remove Infection (incompatible with PHP 8.2) - run: composer remove --dev infection/infection --no-update --no-interaction + run: composer remove --dev infection/infection vimeo/psalm spiral/code-style buggregator/trap testo/bridge-infection --no-update --no-interaction - name: ๐Ÿ“ฅ Install dependencies with composer if: matrix.php-version != '8.1' @@ -58,12 +57,6 @@ jobs: with: dependency-versions: ${{ matrix.dependencies }} - # The dev tooling (linters, mutation testing) targets 8.2+ and isn't needed to run the suite; - # dropping it keeps the 8.1 downgrade surface small. - - name: ๐Ÿงน Slim dev tooling for the PHP 8.1 leg - if: matrix.php-version == '8.1' - run: composer remove --dev vimeo/psalm spiral/code-style buggregator/trap testo/bridge-infection --no-update --no-interaction - - name: ๐Ÿ“ฅ Install and downgrade for PHP 8.1 if: matrix.php-version == '8.1' uses: php-internal/actions/downgrade@v1 @@ -73,8 +66,6 @@ jobs: # Downgrade the test harness (which uses 8.2+ syntax) and the testo config, but not src: # the shipped library must be exercised on 8.1 as written. paths: tests testo.php - # testo ships intentionally unparseable IDE stubs; they are not real code to downgrade. - skip: '*/resources/stubs/*' - name: ๐Ÿงช Run tests run: composer test