Skip to content

Commit 905142c

Browse files
ondrejmirtesclaude
andcommitted
Fix the turbo phpize CI legs
The macOS runner executes run steps with the stock bash 3.2, which has no mapfile — the VERSION.txt computation now joins the manifest paths via jq and lets the shell word-split them. The arena smoke test's child processes locate the extension through TURBO_DLL; its default, turbo-ext/phpstan_turbo.so, only exists in Makefile builds, so the phpize leg sets it explicitly. Also fixes the quoted "$MAPPED_PHP" in the Windows compile job, which collapsed the manifest paths into one pathspec that matched nothing, silently narrowing the version's watched set to turbo-ext/src. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HfL64DBGo52Nz91fBLtf9D
1 parent 9f5355f commit 905142c

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎.github/workflows/phar.yml‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,11 @@ jobs:
253253
command -v autoconf > /dev/null || brew install autoconf
254254
fi
255255
cp -R turbo-ext "$RUNNER_TEMP/turbo-ext"
256-
mapfile -t MAPPED_PHP < <(jq -r '.[] | select(.vendored != true) | .php' turbo-ext/shadowed-classes.json)
257-
git log -1 --format=%H -- turbo-ext/src "${MAPPED_PHP[@]}" | cut -c1-7 > "$RUNNER_TEMP/turbo-ext/VERSION.txt"
256+
# macOS runs the stock /bin/bash 3.2, which has no mapfile — join
257+
# the manifest paths into one string and let the shell word-split it
258+
MAPPED_PHP="$(jq -r '[.[] | select(.vendored != true) | .php] | join(" ")' turbo-ext/shadowed-classes.json)"
259+
# shellcheck disable=SC2086
260+
git log -1 --format=%H -- turbo-ext/src $MAPPED_PHP | cut -c1-7 > "$RUNNER_TEMP/turbo-ext/VERSION.txt"
258261
echo "VERSION.txt: $(cat "$RUNNER_TEMP/turbo-ext/VERSION.txt")"
259262
cd "$RUNNER_TEMP/turbo-ext"
260263
phpize
@@ -274,6 +277,10 @@ jobs:
274277
run: php -d extension="$RUNNER_TEMP/turbo-ext/modules/phpstan_turbo.so" turbo-ext/tests/smoke.php
275278

276279
- name: "Arena smoke test (cross-process shared-memory records)"
280+
# the test's child processes locate the extension through TURBO_DLL —
281+
# its default, turbo-ext/phpstan_turbo.so, only exists in Makefile builds
282+
env:
283+
TURBO_DLL: ${{ runner.temp }}/turbo-ext/modules/phpstan_turbo.so
277284
run: php -d extension="$RUNNER_TEMP/turbo-ext/modules/phpstan_turbo.so" turbo-ext/tests/arena-smoke.php
278285

279286
- name: "Signature parity (reflect native classes against the PHP twins)"
@@ -724,7 +731,11 @@ jobs:
724731
shell: bash
725732
run: |
726733
MAPPED_PHP=$(jq -r '[.[] | select(.vendored != true) | .php] | join(" ")' turbo-ext/shadowed-classes.json)
727-
SHA=$(git log -1 --format=%H -- turbo-ext/src "$MAPPED_PHP" | cut -c1-7)
734+
# unquoted on purpose: the joined manifest paths must word-split
735+
# into one pathspec each (quoted, they were a single pathspec that
736+
# matched nothing, silently narrowing the watched set to turbo-ext/src)
737+
# shellcheck disable=SC2086
738+
SHA=$(git log -1 --format=%H -- turbo-ext/src $MAPPED_PHP | cut -c1-7)
728739
echo "extension version: $SHA"
729740
echo "PHPSTANTURBO_VERSION=$SHA" >> "$GITHUB_ENV"
730741

0 commit comments

Comments
 (0)