Skip to content

[Blueprints] Stop shipping the PHP v2 runner - #4011

Merged
adamziel merged 2 commits into
trunkfrom
blueprint-v2-remove-php-runner
Jul 11, 2026
Merged

[Blueprints] Stop shipping the PHP v2 runner#4011
adamziel merged 2 commits into
trunkfrom
blueprint-v2-remove-php-runner

Conversation

@adamziel

Copy link
Copy Markdown
Collaborator

What it does

Stops shipping and selecting the PHP-based Blueprint v2 runner. Browser and CLI v2 Blueprints already use the TypeScript implementation, so the remote iframe now boots only its normal worker.

This removes the packaged blueprints.phar, the second remote worker, PHAR-specific build plumbing, and the public APIs that existed only for that runner. The standalone PHP Blueprints demo remains unchanged.

Rationale

The PHP runner is no longer part of a supported launch path. Keeping it meant publishing a 1.7 MB PHAR, building another browser worker, and maintaining a second execution API after browser and CLI callers had moved to TypeScript.

Breaking changes

@wp-playground/blueprints no longer exports getV2Runner(), runBlueprintV2(), BlueprintMessage, RawBlueprintV2Data, or ParsedBlueprintV2String. The remote endpoint no longer exposes onBlueprintMessage(), and blueprints-runner=v2 no longer selects a separate worker.

Testing instructions

npm exec -- nx run-many --targets=lint,typecheck --projects=playground-blueprints,playground-remote,playground-client,playground-cli
npm exec -- nx run-many --targets=test --projects=playground-blueprints,playground-client,playground-remote
npm exec -- nx run-many --targets=build --projects=playground-blueprints,playground-remote,playground-client,playground-cli --skipNxCache

The clean build output contains neither a Blueprint PHAR nor a Blueprint v2 remote worker.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Removes the legacy PHP-based Blueprints v2 runner from build outputs and runtime selection, leaving the TypeScript-based execution path as the only supported runner for browser/CLI/remote.

Changes:

  • Drops PHAR assets and PHAR-specific bundling/configuration from Vite builds.
  • Removes the dedicated remote v2 worker and the blueprints-runner query param selection logic.
  • Removes v2 PHP-runner-only public APIs and related types from @wp-playground/blueprints.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/playground/remote/vite.config.ts Stops treating .phar as an includable asset in the remote build.
packages/playground/remote/src/lib/playground-worker-endpoint.ts Removes blueprint-message listener API that existed for the legacy v2 remote runner.
packages/playground/remote/src/lib/playground-worker-endpoint-blueprints-v2.ts Deletes the dedicated v2 remote worker entrypoint.
packages/playground/remote/src/lib/boot-playground-remote.ts Removes query-param-based worker selection; always boots the single remaining worker.
packages/playground/client/src/index.ts Stops forcing blueprints-runner=v1 on the remote iframe URL.
packages/playground/client/src/index.spec.ts Updates assertions to ensure blueprints-runner is no longer added to iframe URLs.
packages/playground/cli/vite.config.ts Removes PHAR-specific transform plugin used to ship blueprints.phar.
packages/playground/cli/tsconfig.lib.json Stops including removed v2 PHP-runner source files in the CLI TS build.
packages/playground/blueprints/vite.config.ts Stops including .phar as a bundled asset for the Blueprints package.
packages/playground/blueprints/src/lib/v2/run-blueprint-v2.ts Deletes the PHP-based v2 runner implementation.
packages/playground/blueprints/src/lib/v2/get-v2-runner.ts Deletes the PHAR loader (blueprints.phar?base64).
packages/playground/blueprints/src/lib/v2/blueprint-v2-declaration.ts Removes parsing/types that were only used by the removed PHP runner.
packages/playground/blueprints/src/index.ts Removes exports that were only used by the removed PHP runner.
packages/playground/blueprints/public/blueprint-v2-schema-validator.js Regenerates schema validator output (definition alias changes).
packages/playground/blueprints/public/blueprint-schema.json Regenerates schema JSON (definition alias changes).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/playground/remote/src/lib/boot-playground-remote.ts Outdated
Comment thread packages/playground/remote/src/lib/boot-playground-remote.ts Outdated
Comment thread packages/playground/client/src/index.ts Outdated
@adamziel adamziel changed the title [Blueprints] Stop shipping the legacy PHP v2 runner Jul 11, 2026
@adamziel
adamziel merged commit f5c6921 into trunk Jul 11, 2026
52 checks passed
@adamziel
adamziel deleted the blueprint-v2-remove-php-runner branch July 11, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment