From 92d78f200c2c50bd0f098c31ff00db9ebb480d4d Mon Sep 17 00:00:00 2001 From: Tom Kay Date: Thu, 3 Sep 2026 12:49:39 +0100 Subject: [PATCH] Run CI as a PHP version matrix on GitHub Actions Replace the single containerised php-actions job (pinned to PHP 7.4) with a setup-php matrix over 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5, mirroring packaged/dal and extending it to current PHP. The lowest version matches the "php": ">=7.4" floor in composer.json. Triggers are narrowed to pushes to master and PRs targeting master; previously every push on every branch ran, double-running on PR branches. PHPUnit 8.5 emits "implicitly nullable parameter" deprecations from its own vendor code on PHP 8.4+, but they are raised at bootstrap and do not affect the exit code. Silencing them means moving to PHPUnit 9+, which is a separate change. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd02dd7..43c9694 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,41 @@ name: CI -on: [ push ] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: - build-test: + test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: + - "7.4" + - "8.0" + - "8.1" + - "8.2" + - "8.3" + - "8.4" + - "8.5" + steps: - - uses: actions/checkout@v5 - - uses: php-actions/composer@v6 - - uses: php-actions/phpunit@v4 + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: - configuration: ./phpunit.xml - php_version: 7.4 - version: 8.5 + php-version: ${{ matrix.php-version }} + coverage: none + + - name: Composer install + run: composer install + + - name: PHPUnit + run: vendor/bin/phpunit