Skip to content

ci(windows-shared): shared-engine Windows SDK (php8ts.dll) + Windows Xdebug catalog - #73

Open
luthermonson wants to merge 1 commit into
mainfrom
feat/windows-shared-sdk
Open

luthermonson wants to merge 1 commit into
mainfrom
feat/windows-shared-sdk

Conversation

@luthermonson

@luthermonson luthermonson commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

The default Windows SDK is a static spc --build-embed. A binary that links PHP statically has no php8ts.dll, and every PHP extension DLL (php_xdebug.dll included) imports the engine from php8ts.dll, so ePHPm on Windows cannot load extensions at all. ePHPm's companion PR (ephpm/ephpm, --variant shared) needs a Windows SDK whose engine is a DLL, plus a Windows Xdebug for ephpm dev --xdebug.

What

A new, separate lane (windows-shared.yml + tools/windows-shared/package.ps1). build.yml and extensions.yml (incl. #72's Xdebug pin) are untouched.

It does not compile PHP. It repackages the official windows.php.net ZTS x64 build of the release (the zip already ships a small static php8embed.lib that imports the engine through php8ts.lib; the devel pack has php8ts.lib + headers). Because the engine is the official one, the official php_*.dll extensions and xdebug.org's Xdebug DLLs are ABI-matched by construction.

Asset Release Contents
php-sdk-<ver>-windows-x86_64-shared.tar.gz v<ver> lib/php8embed.lib, lib/php8ts.lib, include/php/, bin/php8ts.dll + dependency DLLs + bin/ext/php_*.dll, ephpm-sdk.json (ABI identity + preload list), PHP license, redist notices, SBOM
ephpm-ext-<ver>-windows-x86_64.tar.gz ext-<ver> php_xdebug.dll + manifest.json (Linux catalog schema, libc: "msvc", os, crt) + LICENSE-xdebug.txt
  • preload = the static SDK's extension set minus what php8ts.dll compiles in (mbstring, openssl, curl, intl, pdo_mysql, ... and opcache as a zend_extension on 8.3/8.4), in a dependency-safe order.
  • Every download is sha256-verified against checksums.txt (archived releases have no upstream list; Xdebug pins match xdebug.org's published hashes) or the live windows.php.net sha256sum.txt. Missing hash = refusal that prints the hash to pin.
  • Smoke gate before packaging: the official php.exe, run from a directory holding only the packaged bin/ payload, must load all 37 extensions of the static set and register Xdebug as a Zend extension (with Xdebug v3.5.3), and report ZTS.
  • Runs on GitHub-hosted windows-latest (nothing to compile), not the ephemerd fleet.
  • Publishing: workflow_dispatch on main only, via gh release upload --clobber (adds assets, never edits an existing release's title/body). A PR touching the lane packages + smoke-tests 8.3.33 / 8.4.23 / 8.5.7 (ePHPm's current pins) without publishing.

Verified locally (Windows 11, this script)

8.5.7  ZEND_MODULE_API_NO=20250925 vs17: smoke all 37 extensions present; Xdebug 3.5.3 loads as a Zend extension
8.4.23 ZEND_MODULE_API_NO=20240924 vs17: same (opcache preloaded as zend_extension)
8.3.33 ZEND_MODULE_API_NO=20230831 vs16: same
8.5.11 (current release, live checksum path): same

SDK tarballs are 33.6-36.0 MB; ext tarballs 0.2 MB. The 8.5.7 SDK from this script was linked into a shared-engine ephpm.exe (ephpm/ephpm#564), which then loaded Xdebug from the ext tarball and ran a DBGp step session (breakpoint, stack, locals, resume).

CI on this PR (hosted windows-latest): Package 8.3.33 / 8.4.23 / 8.5.7 all pass (~25 s each, including the smoke gate); Publish correctly skipped.

After merge

Dispatch once per pinned version so ePHPm's xtask can download the assets:

gh workflow run windows-shared.yml -f php_version=8.3.33
gh workflow run windows-shared.yml -f php_version=8.4.23
gh workflow run windows-shared.yml -f php_version=8.5.7

Not yet wired into watch-php.yml; a new PHP patch needs a manual dispatch.

The default Windows SDK is a static spc --build-embed, and a binary that
links PHP statically has no php8ts.dll for extension DLLs to import the
engine from, so php_xdebug.dll (or any php_*.dll) cannot load into it.

Add a separate lane, windows-shared.yml + tools/windows-shared/package.ps1,
that repackages the official windows.php.net ZTS x64 build of a release
instead of compiling PHP:

  php-sdk-<ver>-windows-x86_64-shared.tar.gz (attached to v<ver>)
    lib/php8embed.lib + lib/php8ts.lib + include/php + bin/php8ts.dll,
    the dependency DLLs, the official bin/ext/php_*.dll, and
    ephpm-sdk.json whose `preload` list restores the static SDK's
    extension set (mbstring, openssl, intl, pdo_mysql, ...; opcache as a
    zend_extension on 8.3/8.4).
  ephpm-ext-<ver>-windows-x86_64.tar.gz (attached to ext-<ver>)
    php_xdebug.dll (the official xdebug.org ZTS DLL for the minor) +
    manifest.json in the Linux catalog's schema, libc "msvc".

Every download is sha256-verified (checksums.txt pins, or the live
windows.php.net list for current releases; the Xdebug pins match
xdebug.org's published hashes). Packaging is refused unless the official
php.exe, run from a directory holding only the packaged bin/ payload,
loads all 37 extensions of the static set plus Xdebug as a Zend extension.

Nothing is compiled, so it runs on GitHub-hosted windows-latest, not the
ephemerd fleet. Publishing (main + workflow_dispatch only) uses
`gh release upload --clobber`, which adds assets and never rewrites an
existing release's body. A PR touching the lane builds and smoke-tests
8.3.33 / 8.4.23 / 8.5.7 without publishing. build.yml and extensions.yml
are untouched.
@ephpm

ephpm Bot commented Oct 10, 2026

Copy link
Copy Markdown

ePHPm Preview — deployed (health check pending)

URL https://ephpm-php-sdk-pr-73.preview.ephpm.dev
Framework PHP
PHP 8.5
Deployed in 60.5s

Preview updates automatically on each push to this PR.

@ephpm

ephpm Bot commented Oct 10, 2026

Copy link
Copy Markdown

ePHPm Preview — deployed (health check pending)

URL https://ephpm-php-sdk-pr-73.preview.ephpm.dev
Framework PHP
PHP 8.5
Deployed in 60.7s

Preview updates automatically on each push to this PR.

1 similar comment
@ephpm

ephpm Bot commented Oct 10, 2026

Copy link
Copy Markdown

ePHPm Preview — deployed (health check pending)

URL https://ephpm-php-sdk-pr-73.preview.ephpm.dev
Framework PHP
PHP 8.5
Deployed in 60.7s

Preview updates automatically on each push to this PR.

This branch was previously deployed

1 inactive deployment
preview-pr-73 — 736cea92 Deployed Oct 10, 2026 by ephpm[bot]
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.

1 participant