Skip to content

[PHP] Align @php-wasm/{web,node}-5-2 with workspace and add READMEs#3506

Merged
JanJakes merged 2 commits intotrunkfrom
prepare-php-5-2-npm-publish
Apr 17, 2026
Merged

[PHP] Align @php-wasm/{web,node}-5-2 with workspace and add READMEs#3506
JanJakes merged 2 commits intotrunkfrom
prepare-php-5-2-npm-publish

Conversation

@JanJakes
Copy link
Copy Markdown
Member

Summary

  • Bumps the newly-introduced @php-wasm/web-5-2 and @php-wasm/node-5-2 packages from 3.1.193.1.20 to match the current workspace version (lerna.json). Without this they would have been published below their own @php-wasm/universal@3.1.20 dependency and skipped by the next lerna publish patch.
  • Adds README.md for 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 weekly lerna publish CI picks up cleanly from here.

Test plan

  • npm view @php-wasm/web-5-2 version3.1.20
  • npm view @php-wasm/node-5-2 version3.1.20
  • npm access list collaborators @php-wasm/web-5-2 matches @php-wasm/web-8-5
  • Trusted Publisher configured on npmjs.com for both packages (repo WordPress/wordpress-playground, workflow publish-npm-packages.yml, environment npm)

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.
@JanJakes JanJakes requested review from a team, bgrgicak and Copilot April 17, 2026 13:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-2 and @php-wasm/node-5-2 from 3.1.19 to 3.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

Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
```

## Usage

Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- JSPI and Asyncify variants of PHP 5.2 compiled to WebAssembly

No bundled extensions (intl, Xdebug, Redis, Memcached) — calling the
corresponding getter functions throws.
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: ‘getter functions throws’ should be ‘getter functions throw’.

Suggested change
corresponding getter functions throws.
corresponding getter functions throw.

Copilot uses AI. Check for mistakes.
- JSPI and Asyncify variants of PHP 5.2 compiled to WebAssembly

No bundled extensions (intl, Xdebug, Redis, Memcached) — calling the
corresponding getter functions throws.
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: ‘getter functions throws’ should be ‘getter functions throw’.

Suggested change
corresponding getter functions throws.
corresponding getter functions throw.

Copilot uses AI. Check for mistakes.

## Related Packages

- [@php-wasm/web](https://www.npmjs.com/package/@php-wasm/web) - Main package (requires version packages)
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- [@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`)

Copilot uses AI. Check for mistakes.

## Related Packages

- [@php-wasm/node](https://www.npmjs.com/package/@php-wasm/node) - Main package (requires version packages)
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- [@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`)

Copilot uses AI. Check for mistakes.
@JanJakes JanJakes merged commit a427829 into trunk Apr 17, 2026
137 of 139 checks passed
@JanJakes JanJakes deleted the prepare-php-5-2-npm-publish branch April 17, 2026 14:27
adamziel added a commit that referenced this pull request Apr 27, 2026
## 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
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.

3 participants