3030 # The php-parser version whose grammar tables and semantic actions the
3131 # native parser engine (turbo-ext/src/parser/) was ported against.
3232 SUPPORTED_PHP_PARSER_VERSION : " v5.9.0"
33- # Composer for the turbo container legs, pinned by checksum. The distro
34- # composers are unusable there: jammy's 2.2.6 fatals under PHP 8.5, and
35- # Alpine's /usr/bin/composer is a shell wrapper hardwired to the
36- # distro-default PHP.
37- COMPOSER_VERSION : " 2.9.2"
38- COMPOSER_PHAR_SHA256 : " 471f2d857abf0ec18af7b055e61472214d91adb24f9bdbbb864c1c64faad7dd6"
3933 # setup-php installs an 8.6 nightly, which has no matching Windows devel pack.
4034 PHP86_WINDOWS_VERSION : " 8.6.0RC2"
4135
@@ -520,14 +514,16 @@ jobs:
520514 with :
521515 ignore-cache : true
522516
523- - name : " Install Composer dependencies (pinned composer)"
517+ - name : " Install Composer dependencies (verified composer)"
524518 if : env.ORIGIN_RUN_ID == '' && matrix.target.family != 'macos'
525- # checksum-pinned composer, run under the matrix PHP so platform
526- # requirements are validated against the interpreter the build
527- # trains on
519+ # signature-verified composer (.github/scripts/download-composer.sh;
520+ # the distro composers are unusable here: jammy's 2.2.6 fatals under
521+ # PHP 8.5, and Alpine's /usr/bin/composer is a shell wrapper
522+ # hardwired to the distro-default PHP), run under the matrix PHP so
523+ # platform requirements are validated against the interpreter the
524+ # build trains on
528525 run : |
529- curl -fsSLo composer.phar "https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar"
530- echo "$COMPOSER_PHAR_SHA256 composer.phar" | sha256sum -c -
526+ sh .github/scripts/download-composer.sh
531527 php composer.phar install --no-interaction --no-progress
532528 rm composer.phar
533529
@@ -648,7 +644,7 @@ jobs:
648644 run : |
649645 docker run -d --name alpine-build \
650646 -v "$PWD:/work" -w /work \
651- -e PHP_MINOR -e PHP_ZTS -e COMPOSER_VERSION -e COMPOSER_PHAR_SHA256 \
647+ -e PHP_MINOR -e PHP_ZTS \
652648 alpine:3.24 sleep 7200
653649
654650 - name : " Install PHP and build tools"
@@ -663,12 +659,11 @@ jobs:
663659 run : docker exec alpine-build git config --global --add safe.directory /work
664660
665661 # The training run of `make pgo` runs bin/phpstan on the checkout.
666- - name : " Install Composer dependencies (pinned composer)"
662+ - name : " Install Composer dependencies (verified composer)"
667663 if : env.ORIGIN_RUN_ID == ''
668664 run : |
669665 docker exec -i alpine-build sh -e <<'EOF'
670- curl -fsSLo composer.phar "https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar"
671- echo "$COMPOSER_PHAR_SHA256 composer.phar" | sha256sum -c -
666+ sh .github/scripts/download-composer.sh
672667 COMPOSER_HOME="$(mktemp -d)" php composer.phar install --no-interaction --no-progress
673668 rm composer.phar
674669 EOF
@@ -844,11 +839,10 @@ jobs:
844839 with :
845840 ignore-cache : true
846841
847- - name : " Install Composer dependencies (pinned composer)"
842+ - name : " Install Composer dependencies (verified composer)"
848843 if : matrix.variant == 'pie' && matrix.target.family != 'macos'
849844 run : |
850- curl -fsSLo composer.phar "https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar"
851- echo "$COMPOSER_PHAR_SHA256 composer.phar" | sha256sum -c -
845+ sh .github/scripts/download-composer.sh
852846 php composer.phar install --no-interaction --no-progress
853847 rm composer.phar
854848
@@ -961,7 +955,7 @@ jobs:
961955 run : |
962956 docker run -d --name alpine-build \
963957 -v "$PWD:/work" -w /work \
964- -e PHP_MINOR -e PHP_ZTS -e COMPOSER_VERSION -e COMPOSER_PHAR_SHA256 \
958+ -e PHP_MINOR -e PHP_ZTS \
965959 "$ALPINE_IMAGE" sleep 7200
966960
967961 - name : " Install PHP and build tools"
@@ -986,8 +980,7 @@ jobs:
986980 if : matrix.variant == 'pie'
987981 run : |
988982 docker exec -i -w /work alpine-build sh -e <<'EOF'
989- curl -fsSLo composer.phar "https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar"
990- echo "$COMPOSER_PHAR_SHA256 composer.phar" | sha256sum -c -
983+ sh .github/scripts/download-composer.sh
991984 php composer.phar install --no-interaction --no-progress
992985 rm composer.phar
993986 cd turbo-ext
@@ -1874,11 +1867,10 @@ jobs:
18741867 with :
18751868 ignore-cache : true
18761869
1877- - name : " Install Composer dependencies (pinned composer)"
1870+ - name : " Install Composer dependencies (verified composer)"
18781871 if : ${{ matrix.container }}
18791872 run : |
1880- curl -fsSLo composer.phar "https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar"
1881- echo "$COMPOSER_PHAR_SHA256 composer.phar" | sha256sum -c -
1873+ sh .github/scripts/download-composer.sh
18821874 php composer.phar install --no-interaction --no-progress
18831875 rm composer.phar
18841876
@@ -1988,7 +1980,7 @@ jobs:
19881980 run : |
19891981 docker run -d --name alpine-test \
19901982 -v "$PWD:/work" -w /work \
1991- -e PHP_MINOR -e PHP_ZTS -e COMPOSER_VERSION -e COMPOSER_PHAR_SHA256 \
1983+ -e PHP_MINOR -e PHP_ZTS \
19921984 "$ALPINE_IMAGE" sleep 7200
19931985
19941986 - name : " Install PHP and tools"
@@ -1997,11 +1989,10 @@ jobs:
19971989 - name : " Trust the checkout despite the container/host uid mismatch"
19981990 run : docker exec alpine-test git config --global --add safe.directory /work
19991991
2000- - name : " Install Composer dependencies (pinned composer)"
1992+ - name : " Install Composer dependencies (verified composer)"
20011993 run : |
20021994 docker exec -i alpine-test sh -e <<'EOF'
2003- curl -fsSLo composer.phar "https://getcomposer.org/download/$COMPOSER_VERSION/composer.phar"
2004- echo "$COMPOSER_PHAR_SHA256 composer.phar" | sha256sum -c -
1995+ sh .github/scripts/download-composer.sh
20051996 COMPOSER_HOME="$(mktemp -d)" php composer.phar install --no-interaction --no-progress
20061997 rm composer.phar
20071998 EOF
0 commit comments