From a185dcd8d7aeb47abca02b51adc8a1680432d70c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Oct 2026 19:43:48 +0000 Subject: [PATCH] Use the runner image's PHP in composer e2e legs The required composer e2e leg asked setup-php for PHP 8.2, which the ubuntu-24.04 image does not ship, so every run fetched it from the network: ~56s per leg on success, and on 2026-10-21 the download broke and failed the leg with "Could not setup PHP 8.2". Default to 8.3, the image's own PHP, so setup-php only switches to it. composer 2.2 on 8.3 is already covered by composer-compatibility.yml; the nightly composer 1 leg keeps 8.2 through a new `php:` matrix override. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01MjB7WMceeF5ZzGrmz93omi --- .github/workflows/ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 764e0bbbf..6331cff7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1524,10 +1524,14 @@ jobs: if: matrix.composer != '' # The composer capstones shell out to a real composer; `composer:` # pins the release line (1, 2.2 LTS, 2) so the composer.lock grammar - # the edits assert stays stable across runners. + # the edits assert stays stable across runners. PHP defaults to 8.3, + # the ubuntu-24.04 image's own PHP, so setup-php only switches to it + # instead of fetching another PHP from the network (8.2 took ~56s per + # leg and failed outright when the download broke). `php:` overrides + # it for a composer line that wants an older PHP. uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: - php-version: '8.2' + php-version: ${{ matrix.php || '8.3' }} tools: composer:${{ matrix.composer }} - name: Select the JVM toolchain (JVM legs) @@ -1849,7 +1853,9 @@ jobs: matrix: include: - {os: ubuntu-latest, suite: e2e_vendor_composer_build e2e_redirect_composer_build, composer: '2.2'} - - {os: ubuntu-latest, suite: e2e_vendor_composer_build e2e_redirect_composer_build, composer: '1'} + # composer 1.10 keeps the PHP 8.2 it has always run on here + # (composer-compatibility.yml runs 1.10.28 on 8.1). + - {os: ubuntu-latest, suite: e2e_vendor_composer_build e2e_redirect_composer_build, composer: '1', php: '8.2'} - {os: ubuntu-latest, suite: e2e_redirect_gem_build e2e_vendor_gem_build, ruby: '3.1', bundler: '1.17.3'} - {os: ubuntu-latest, suite: e2e_redirect_gem_build e2e_vendor_gem_build, ruby: '3.1', bundler: '2.1.4'} - {os: ubuntu-latest, suite: e2e_redirect_gem_build e2e_vendor_gem_build, ruby: '3.1', bundler: '2.2.33'}