Skip to content

Resolve the Windows PHP prerelease from windows.php.net's manifests - #6713

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
resolve-php-windows-prereleases
Oct 9, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
resolve-php-windows-prereleases

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

On Windows, setup-php installs a nightly for an unreleased minor (Installed PHP 8.6.0-dev (1228a4c3…)). A nightly has no devel pack, so the turbo Windows legs swap in the official prerelease. Its version was hardcoded as PHP86_WINDOWS_VERSION, which went stale (8.6.0RC2 while RC3 is out). The download wasn't verified either.

What changes:

  • A new job resolves the prerelease. php-windows-prereleases reads windows.php.net's stable and QA manifests (releases.json). For every minor in this workflow's matrices without a stable Windows build, it outputs the prerelease's version and each file's name and SHA-256: NTS and TS runtimes, and their devel packs.
  • Downloads are verified. install-php-windows-prerelease.sh and download-php-windows-devel.sh take that entry and check the SHA-256s.
  • No hardcoded 8.6. The three steps run for whichever minors the job lists.
  • Resolved once per run, so every leg uses the same build even if a new RC comes out mid-run. RCs have changed the module API before.
  • It retires itself. Once a minor has its stable release, the swap stops and setup-php's stable runtime is used as is. The next new minor works without edits.
  • Core reuse is no longer broken by RC bumps. Today an RC bump changes the workflow env: that turbo-origins compares, so every core is rebuilt even though no core is compiled against 8.6.

Tested locally:

  • The resolver against the live manifests: today it finds only 8.6, at 8.6.0RC3.
  • An unknown minor fails with an error.
  • The workflow's exact yq line with mikefarah yq v4: it lists 7.4–8.6.
  • A real devel pack downloads and passes its checksum.
  • shellcheck and actionlint are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017h1GfB7vfJPgwcTHD9Fth6

env:
MATRIX_TS: ${{ matrix.ts }}
run: bash .github/scripts/install-php86-windows.sh
PHP_PRERELEASE: ${{ toJSON(fromJSON(needs.php-windows-prereleases.outputs.prereleases)[matrix.php-version]) }}
env:
MATRIX_TS: ${{ matrix.ts }}
MATRIX_VS: ${{ matrix.vs }}
PHP_PRERELEASE: ${{ toJSON(fromJSON(needs.php-windows-prereleases.outputs.prereleases)[matrix.php-version]) }}
env:
MATRIX_TS: ${{ matrix.ts }}
run: bash .github/scripts/install-php86-windows.sh
PHP_PRERELEASE: ${{ toJSON(fromJSON(needs.php-windows-prereleases.outputs.prereleases)[matrix.php-version]) }}
env:
MATRIX_TS: ${{ matrix.ts }}
run: bash .github/scripts/install-php86-windows.sh
PHP_PRERELEASE: ${{ toJSON(fromJSON(needs.php-windows-prereleases.outputs.prereleases)[matrix.php-version]) }}
On Windows, setup-php installs a nightly for an unreleased minor, and a
nightly has no devel pack, so the turbo legs replace it with the official
prerelease. Its version was pinned in PHP86_WINDOWS_VERSION, which went
stale (8.6.0RC2 while RC3 is out), and its download was not verified.

The new php-windows-prereleases job reads windows.php.net's stable and QA
manifests once per run. For every minor in the workflow's matrices that has
no stable Windows build, it outputs the prerelease's version and the file
name and SHA-256 of each runtime and devel pack. The install and devel-pack
steps use that entry and verify the checksums, and run for whichever minors
it lists. Resolving once per run keeps every leg on the same build when a
release candidate comes out mid-run. Once a minor has its stable release,
the swap stops on its own.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017h1GfB7vfJPgwcTHD9Fth6
@ondrejmirtes
ondrejmirtes force-pushed the resolve-php-windows-prereleases branch from 9a04af9 to 727637a Compare October 9, 2026 07:52
@ondrejmirtes
ondrejmirtes merged commit a6c9f64 into 2.3.x Oct 9, 2026
517 of 519 checks passed
@ondrejmirtes
ondrejmirtes deleted the resolve-php-windows-prereleases branch October 9, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants