-
Notifications
You must be signed in to change notification settings - Fork 41
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
wp-now: Support for running a Blueprint on start #80
Comments
For this particular scenario, what would be optimal is the ability to add the following to define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] ); However, wp-now is currently defining these on its own, so they can't be defined again. We should figure out a more elegant solution here. |
JSON schema validation would be a very useful core feature. Btw, the Schema file is autogenerated in core from Typescript types. As for the site url, Blueprints have a step called defineWpConfigConst that can be called multiple times with the same consts to override the previously defined values. |
Also there’s a DefineSiteUrlStep step |
This approach worked well for localhost, but it failed with http/https protocols when proxying with ngrok.
|
Replaces output streams with temporary files to fix the following test case: ``` ● PHP › should echo bytes expect( php.run('<?php echo chr(1).chr(0).chr(1).chr(0).chr(2);').stdout ).toBe('\x01\x00\x01\x00\x02'); Expected: "1 0 1 0 2" Received: "1 1 2" ``` Turns out Emscripten has special semantics for null bytes in stdout and doesn't pass them to JavaScript handlers. This commit ditches stdout and stderr as a transport, and moves to temporary files instead. This way the null bytes output by PHP make it unchanged to the browser. One other change to enable that is upgrading the PHPOutput.stdout datatype from string to ArrayBuffer to make sure the bytes are passed around correctly. Solves WordPress#80
Blueprints are an abstraction for configuring the WordPress install. Let's make it possible to run a Blueprint file when starting:
Done is:
wp-now start
supports a--blueprint=<file>
argument. We should support arbitrary file names, as long as they validate against the JSON Schema.wp-now start
validates it against the JSON Schema first and throws an error if it doesn't validate.wp-now start
runs.README.md
is updated to document how Blueprints work, including examples for wp-now: Add support for custom URL's #78 and Ability to define WP_DEBUG and other constants in the wp-config.php #17The text was updated successfully, but these errors were encountered: