Skip to content

[Playground CLI] Use Blueprints v2 #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: php-wasm-support-any-php-subprocess
Choose a base branch
from

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jun 5, 2025

This is a first stab at running Blueprints.phar in Playground CLI. It seems to be correctly installing the WordPress site 🎉

Remaining work

  • Trigger mount-related lifecycle callbacks from the PHP code. For example, after unpacking but before installing WordPress, or after installing WordPress.
  • Code structure – Make the spawn handler generic, move it to some useful package.
  • Clearly separate bootWordPress from bootRequestHandler. Perhaps relocate the latter.
  • Propagate CLI args / site URL to runV2() call

Follow-up work

Some of these items might be better suited for other PRs.

  • Fix playground.cli() method to avoid mocking cliBootstrapScript inline
  • Report Blueprint runner progress live, not after the work is done. We may need a callback or a ReadableStream to get the stdout bytes live.
  • Find a way of telling the PHP instance what is the current CWD (to avoid the chdir() call)

cc @bgrgicak @akirk @adamziel @wojtekn

This is a first stab at running Blueprints.phar in Playground CLI. It
seems to be correctly installing the WordPress site.

Some of these items might be better suited for other PRs.

* Code structure – Make the spawn handler generic, move it to some
  useful package.
* Clearly separate bootWordPress from bootRequestHandler. Perhaps
  relocate the latter.
* Fix playground.cli() method to avoid mocking cliBootstrapScript inline
* Report Blueprint runner progress live, not after the work is done. We
  may need a callback or a ReadableStream to get the stdout bytes live.
* Find a way of telling the PHP instance what is the current CWD (to
  avoid the chdir() call)
* Propagate CLI args / site URL to runV2() call

cc @bgrgicak @akirk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

1 participant