Playground Boot: Align the boot process between remote.html and CLI - #1389
Merged
Conversation
adamziel
changed the base branch from
setup-sqlite-integration-without-creating-db-php
to
trunk
May 14, 2024 10:21
adamziel
force-pushed
the
install-sqlite-function
branch
from
May 14, 2024 10:24
cc703f5 to
8fff9cc
Compare
Collaborator
Author
|
The remaining parts start looking similar, too – there's handling mounts, setting site URL etc. We're getting closer to a consistent boot flow! |
adamziel
added a commit
that referenced
this pull request
May 15, 2024
…1389) Aligns the boot process between the in-browser Playground Remote and Node-oriented Playground CLI. With this PR, both apps use a similar `createPHP()` function that: * Sets up the SAPI name * Sets up PHP ini entries * Sets up the `/phpinfo.php` route * Sets up platform-level mu0plugins * Proxies filesystem directories from secondary PHP instances to primary * Sets up PHP runtime rotation to avoid OOM errors in long-running primary processes There are still the following discrepancies: * The in-browser PHP sets up a SAPI name conditionally, Node.js one always uses `cli` (it probably shouldn't) * The in-browser PHP uses a custom spawn handler * The in-browser PHP uses a different set of php.ini directives * The in-browser PHP loads more mu-plugins * The Node.js PHP sets up CA certificates for HTTPS connections (the in-browser PHP [will fake the CA chain eventually](#1093)) This is the first step towards a consistent Boot Protocol, see #1379 for more details. ## Testing Instructions * Confirm the CI checks work * Run `bun packages/playground/cli/src/cli.ts server --login`, confirm the server starts without issues, test wp-admin and HTTPS-reliant features like the plugin directories. We'll need a set of unit tests for these new boot-related features, let's create them sooner than later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR doing?
Aligns the boot process between the in-browser Playground Remote and Node-oriented Playground CLI.
With this PR, both apps use a similar
createPHP()function that:/phpinfo.phprouteThere are still the following discrepancies:
cli(it probably shouldn't)This is the first step towards a consistent Boot Protocol, see #1379 for more details.
Testing Instructions
bun packages/playground/cli/src/cli.ts server --login, confirm the server starts without issues, test wp-admin and HTTPS-reliant features like the plugin directories.We'll need a set of unit tests for these new boot-related features, let's create them sooner than later.