You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/playground/cli/README.md
+38-1Lines changed: 38 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,13 +94,50 @@ The `server` command supports the following optional arguments:
94
94
-`--wordpress-install-mode <mode>`: Control how Playground prepares WordPress before booting. Defaults to `download-and-install`. Other options: `install-from-existing-files` (install using files you've mounted), `install-from-existing-files-if-needed` (same, but skip setup when an existing site is detected), and `do-not-attempt-installing` (never download or install WordPress).
95
95
-`--skip-sqlite-setup`: Do not set up the SQLite database integration.
96
96
-`--verbosity`: Output logs and progress messages (choices: "quiet", "normal", "debug"). Defaults to "normal".
97
-
98
97
-`--debug`: Print the PHP error log if an error occurs during boot.
99
98
-`--follow-symlinks`: Allow Playground to follow symlinks by automatically mounting symlinked directories and files encountered in mounted directories. ⚠️ Warning: Following symlinks will expose files outside mounted directories to Playground and could be a security risk.
100
99
-`--workers=<n|auto>`: Number of request-handling worker threads. Pass a positive integer, or `auto` to use one worker per CPU core (minus one). Defaults to `min(6, cpus-1)`. Useful for multi-client workloads (e.g. parallel e2e suites) that need more than 6 in-flight requests.
101
100
-`--experimental-multi-worker`: Deprecated. Use `--workers=<n|auto>` instead. The value of this flag is ignored.
102
101
-`--phpmyadmin[=<path>]`: Install phpMyAdmin for database management. The phpMyAdmin URL will be printed after boot. Optionally specify a custom URL path (default: `/phpmyadmin`).
103
102
-`--internal-cookie-store`: Enables Playground's internal cookie handling. When active, Playground uses an HttpCookieStore to manage and persist cookies across requests. If disabled, cookies are handled externally, like by a browser in Node.js.
103
+
-`--php-extension=<manifest>`: Load a custom PHP.wasm extension manifest before PHP starts. Accepts local paths, `file:` URLs, and `http(s):` URLs. Can be used multiple times.
104
+
-`--php-extension-config=<path>`: Load a JSON extension config before PHP starts. Use this for direct `.so` URLs or extension-specific `iniEntries` and `env` settings. Can be used multiple times.
105
+
106
+
### Loading Custom PHP.wasm Extensions
107
+
108
+
Custom extensions built with `@php-wasm/compile-extension` can be loaded with
Copy file name to clipboardExpand all lines: packages/playground/cli/src/run-cli.ts
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -299,6 +299,20 @@ export async function parseOptionsAndRunCLI(argsToParse: string[]) {
299
299
type: 'boolean',
300
300
default: false,
301
301
},
302
+
'php-extension': {
303
+
describe:
304
+
'Load a custom PHP.wasm extension manifest before PHP starts. Can be a local path, file: URL, or http(s) URL. Can be used multiple times.',
305
+
type: 'array',
306
+
string: true,
307
+
nargs: 1,
308
+
},
309
+
'php-extension-config': {
310
+
describe:
311
+
'Load a JSON PHP.wasm extension config before PHP starts. Use this for direct .so URLs or extension-specific ini/env settings. Can be used multiple times.',
312
+
type: 'array',
313
+
string: true,
314
+
nargs: 1,
315
+
},
302
316
'experimental-unsafe-ide-integration': {
303
317
describe:
304
318
'Enable experimental IDE development tools. This option edits IDE config files '+
@@ -422,6 +436,8 @@ export async function parseOptionsAndRunCLI(argsToParse: string[]) {
0 commit comments