Skip to content

ci: run the test suite on PHP 8.1 - #7

Open
roxblnfk wants to merge 7 commits into
1.xfrom
ci/test-php-8.1
Open

ci: run the test suite on PHP 8.1#7
roxblnfk wants to merge 7 commits into
1.xfrom
ci/test-php-8.1

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Sep 8, 2026

Copy link
Copy Markdown
Member

🔍 What was changed

  • Adds an 8.1 leg to the unit-testing matrix.
  • On 8.1 it drops the dev tools the suite does not need, then uses php-internal/actions/downgrade to resolve dependencies as if on 8.1 (so Composer picks 8.1-compatible versions and symfony falls to 6.x) and downgrades whatever has no 8.1-compatible version.
  • Only tests and testo.php are downgraded, not src, so the library's own code is exercised on 8.1 as written.

Why?

The library declares php: >=8.1 but was only ever run on 8.2+, because its test runner (testo) and the rest of the dev tooling target 8.2+. This leg proves the package actually runs on its stated minimum.

Review notes

The 8.1 leg is red at Run tests for now: the installed testo 0.10.40 calls ReflectionMethod::hasPrototype() (an 8.2 API) and rector ^2.6 has no downgrade rule for it yet (rectorphp/rector-downgrade-php#398). Everything before that (resolve, relieve, Rector downgrade of the testo packages) runs. It goes green once the rule ships; bump the action's rector-version then.

Checklist

  • How was this tested:
    • Tested manually
    • Unit tests added

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)
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)
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)
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)
php-internal/actions/install-php was renamed to .../downgrade.

Assisted-By: Claude Opus 4.8 (1M context)
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant