Skip to content

Commit 68d682e

Browse files
Use the runner image's PHP in composer e2e legs (#1659)
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. Claude-Session: https://claude.ai/code/session_01MjB7WMceeF5ZzGrmz93omi Co-authored-by: Claude <noreply@anthropic.com>
1 parent 44a86cf commit 68d682e

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,10 +1524,14 @@ jobs:
15241524
if: matrix.composer != ''
15251525
# The composer capstones shell out to a real composer; `composer:`
15261526
# pins the release line (1, 2.2 LTS, 2) so the composer.lock grammar
1527-
# the edits assert stays stable across runners.
1527+
# the edits assert stays stable across runners. PHP defaults to 8.3,
1528+
# the ubuntu-24.04 image's own PHP, so setup-php only switches to it
1529+
# instead of fetching another PHP from the network (8.2 took ~56s per
1530+
# leg and failed outright when the download broke). `php:` overrides
1531+
# it for a composer line that wants an older PHP.
15281532
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
15291533
with:
1530-
php-version: '8.2'
1534+
php-version: ${{ matrix.php || '8.3' }}
15311535
tools: composer:${{ matrix.composer }}
15321536

15331537
- name: Select the JVM toolchain (JVM legs)
@@ -1849,7 +1853,9 @@ jobs:
18491853
matrix:
18501854
include:
18511855
- {os: ubuntu-latest, suite: e2e_vendor_composer_build e2e_redirect_composer_build, composer: '2.2'}
1852-
- {os: ubuntu-latest, suite: e2e_vendor_composer_build e2e_redirect_composer_build, composer: '1'}
1856+
# composer 1.10 keeps the PHP 8.2 it has always run on here
1857+
# (composer-compatibility.yml runs 1.10.28 on 8.1).
1858+
- {os: ubuntu-latest, suite: e2e_vendor_composer_build e2e_redirect_composer_build, composer: '1', php: '8.2'}
18531859
- {os: ubuntu-latest, suite: e2e_redirect_gem_build e2e_vendor_gem_build, ruby: '3.1', bundler: '1.17.3'}
18541860
- {os: ubuntu-latest, suite: e2e_redirect_gem_build e2e_vendor_gem_build, ruby: '3.1', bundler: '2.1.4'}
18551861
- {os: ubuntu-latest, suite: e2e_redirect_gem_build e2e_vendor_gem_build, ruby: '3.1', bundler: '2.2.33'}

0 commit comments

Comments
 (0)