[PHP] Align @php-wasm/{web,node}-5-2 with workspace and add READMEs#3506
[PHP] Align @php-wasm/{web,node}-5-2 with workspace and add READMEs#3506
Conversation
Align the new PHP 5.2 packages with the current workspace version before the initial manual npm publish. Without this they would ship at 3.1.19 while depending on @php-wasm/universal@3.1.20, and get skipped by the next `lerna publish patch` bump to 3.1.21.
Every other version package under packages/php-wasm/{web,node}-builds/*
ships a short README.md describing the variants and usage. Add
equivalent ones for the new 5.2 packages so their npmjs.com pages
aren't blank. Note that 5.2 bundles no extensions — all getter
functions throw.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Aligns the legacy PHP 5.2 versioned packages with the workspace release version and adds minimal READMEs so the npm package pages aren’t empty and constraints/limitations are clear.
Changes:
- Bump
@php-wasm/web-5-2and@php-wasm/node-5-2from3.1.19to3.1.20. - Add README files for both packages with installation/usage guidance and extension limitations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/php-wasm/web-builds/5-2/package.json | Aligns published package version with workspace (3.1.20). |
| packages/php-wasm/web-builds/5-2/README.md | Documents the web 5.2 build, installation, usage, and limitations. |
| packages/php-wasm/node-builds/5-2/package.json | Aligns published package version with workspace (3.1.20). |
| packages/php-wasm/node-builds/5-2/README.md | Documents the Node.js 5.2 build, installation, usage, and limitations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ``` | ||
|
|
||
| ## Usage | ||
|
|
There was a problem hiding this comment.
The example uses await at top level, which will fail in many CommonJS / non-top-level-await environments. Consider wrapping in an async function (or explicitly noting that the example requires ESM + top-level await) so users can copy/paste successfully.
| ``` | ||
|
|
||
| ## Usage | ||
|
|
There was a problem hiding this comment.
The example uses await at top level, which will fail in many Node.js setups (CommonJS or ESM without top-level await). Consider wrapping in an async function (or explicitly stating the required module system) to make the snippet reliably usable.
| - JSPI and Asyncify variants of PHP 5.2 compiled to WebAssembly | ||
|
|
||
| No bundled extensions (intl, Xdebug, Redis, Memcached) — calling the | ||
| corresponding getter functions throws. |
There was a problem hiding this comment.
Grammar: ‘getter functions throws’ should be ‘getter functions throw’.
| corresponding getter functions throws. | |
| corresponding getter functions throw. |
| - JSPI and Asyncify variants of PHP 5.2 compiled to WebAssembly | ||
|
|
||
| No bundled extensions (intl, Xdebug, Redis, Memcached) — calling the | ||
| corresponding getter functions throws. |
There was a problem hiding this comment.
Grammar: ‘getter functions throws’ should be ‘getter functions throw’.
| corresponding getter functions throws. | |
| corresponding getter functions throw. |
|
|
||
| ## Related Packages | ||
|
|
||
| - [@php-wasm/web](https://www.npmjs.com/package/@php-wasm/web) - Main package (requires version packages) |
There was a problem hiding this comment.
The phrase “requires version packages” is ambiguous. Consider clarifying what consumers should install/import (e.g., ‘requires a versioned build package like @php-wasm/web-5-2 / @php-wasm/web-8-5’) to reduce confusion.
| - [@php-wasm/web](https://www.npmjs.com/package/@php-wasm/web) - Main package (requires version packages) | |
| - [@php-wasm/web](https://www.npmjs.com/package/@php-wasm/web) - Main package (requires a versioned build package such as `@php-wasm/web-5-2` or `@php-wasm/web-8-5`) |
|
|
||
| ## Related Packages | ||
|
|
||
| - [@php-wasm/node](https://www.npmjs.com/package/@php-wasm/node) - Main package (requires version packages) |
There was a problem hiding this comment.
The phrase “requires version packages” is ambiguous. Consider clarifying what consumers should install/import (e.g., ‘requires a versioned build package like @php-wasm/node-5-2 / @php-wasm/node-8-5’) to reduce confusion.
| - [@php-wasm/node](https://www.npmjs.com/package/@php-wasm/node) - Main package (requires version packages) | |
| - [@php-wasm/node](https://www.npmjs.com/package/@php-wasm/node) - Main package (requires a versioned build package such as `@php-wasm/node-5-2`) |
## Summary The `chore: update changelog` bot has been failing CI on trunk since v3.1.21. Docusaurus parses `packages/docs/site/docs/main/changelog.md` as MDX, so the auto-generated entry for PR #3506 — `@php-wasm/{web,node}-5-2` — was read as a JSX expression and crashed the SSG with `ReferenceError: web is not defined`. That took out both `test-docs-api-reference` and `Deploy doc site`. The refresh script now escapes `{` and `}` when copying the changelog into the docs, so any future PR title with braces stays inert. The currently-broken v3.1.21 entry is escaped in this PR to unbreak trunk immediately. ## Test plan - [ ] `test-docs-api-reference` passes - [ ] `Deploy doc site` passes
Summary
@php-wasm/web-5-2and@php-wasm/node-5-2packages from3.1.19→3.1.20to match the current workspace version (lerna.json). Without this they would have been published below their own@php-wasm/universal@3.1.20dependency and skipped by the nextlerna publish patch.README.mdfor both packages, mirroring the 8-5 style. The blurb notes that 5.2 bundles no extensions (intl/Xdebug/Redis/Memcached getters all throw), so the npmjs.com page isn't blank and consumers aren't surprised.Follow-up to #3501. Both packages are already live on npm at
3.1.20— this PR brings the source tree in sync so the weeklylerna publishCI picks up cleanly from here.Test plan
npm view @php-wasm/web-5-2 version→3.1.20npm view @php-wasm/node-5-2 version→3.1.20npm access list collaborators @php-wasm/web-5-2matches@php-wasm/web-8-5WordPress/wordpress-playground, workflowpublish-npm-packages.yml, environmentnpm)