Skip to content

[CLI] Support staged PHP.wasm side modules#3620

Draft
adamziel wants to merge 1 commit into
add-cli-php-extension-loadingfrom
adamziel/php-wasm-side-module-extension-loading
Draft

[CLI] Support staged PHP.wasm side modules#3620
adamziel wants to merge 1 commit into
add-cli-php-extension-loadingfrom
adamziel/php-wasm-side-module-extension-loading

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

@adamziel adamziel commented May 12, 2026

What changed

  • Adds support for custom PHP.wasm artifacts that should be staged before PHP starts without generating a php.ini extension= entry.
  • Allows runtime/CLI extension configs to pass loadWithIniDirective: false.
  • Updates CLI/runtime docs and tests for staging without php.ini registration.

Why

Some Wasm artifacts are consumed by another runtime component instead of PHP's extension loader. They still need PR 3616's startup-time fetch/staging path, but registering them through php.ini makes PHP try to load them as PHP extensions.

Validation

  • npx vitest run packages/php-wasm/universal/src/lib/load-extension.spec.ts --config packages/php-wasm/universal/vite.config.ts
  • npx vitest run packages/php-wasm/node/src/test/with-php-extensions.spec.ts --config packages/php-wasm/node/vite.config.ts
  • npx vitest run packages/playground/cli/tests/php-extensions.spec.ts --config packages/playground/cli/vite.config.ts
  • npx tsc -p packages/php-wasm/universal/tsconfig.lib.json --noEmit

@adamziel adamziel force-pushed the adamziel/php-wasm-side-module-extension-loading branch from 94e808c to e0d3db0 Compare May 12, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant