Skip to content

ci: Run tests on every pull request across PHP 7.1 to 8.4 - #3

Merged
PresentKim merged 2 commits into
mainfrom
ci/verify-pull-requests
Oct 7, 2026
Merged

PresentKim merged 2 commits into
mainfrom
ci/verify-pull-requests

Conversation

@PresentKim

@PresentKim PresentKim commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a workflow that verifies every pull request. Until now only the benchmark workflow existed (PHP 7.3 and 8.4, on pushes to main), so the declared minimum of PHP 7.1 was never actually run.

Jobs

  • PHPUnit on PHP 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3 and 8.4: php -l on src and tests/unit, then composer test. phpbench is removed before installing because it does not support the oldest PHP versions and tests do not need it.
  • Generated traits are up to date: python3 tools/generate-traits.py --check.

The workflow also has workflow_dispatch so it can be started manually.

Other change

  • composer.json: PHPUnit constraint is now ^7.5 || ^8.5 || ^9.5. With ^7.5 || ^9.5, Composer could only pick PHPUnit 9 on PHP 7.2, which requires PHP 7.3, so installation failed there.

Notes

  • The workflow runs on this PR, so its own result is the verification. All 9 PHP versions and the trait check pass (PHP 7.1 to 8.4).

- Run PHPUnit and lint on PHP 7.1 - 8.4
- Check that the generated traits are up to date
PHPUnit 9 requires PHP 7.3 and Composer resolved only PHPUnit 9 on PHP 7.2
("^7.5 || ^9.5"), so dependency installation failed there. Adding ^8.5
gives PHP 7.2 an installable PHPUnit.
@PresentKim
PresentKim force-pushed the ci/verify-pull-requests branch from d65b951 to 9e9fa68 Compare October 7, 2026 06:22
@PresentKim
PresentKim merged commit 781fca6 into main Oct 7, 2026
10 checks passed
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