Skip to content

Commit 8964d1b

Browse files
committed
[PHP] Include CLI SAPI in the web PHP.wasm build
This PR ships the web wasm binaries with the `run_cli` C function that enables calling php.cli(). Intertwining the CLI SAPI usage with the web SAPI usage was impractical before #2559, but now we can easily call `await php.cli(); await php.run()` on the same PHP instance. Note this PR does not expose the `.cli()` method to the public yet. It only ships the updated WASM binaries to unlock that. ## Testing instructions CI
1 parent f0e4956 commit 8964d1b

File tree

35 files changed

+52
-52
lines changed

35 files changed

+52
-52
lines changed

packages/php-wasm/compile/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const args = argParser.argv;
178178
const platformDefaults = {
179179
all: {
180180
PHP_VERSION: '8.0.24',
181+
WITH_CLI_SAPI: 'yes',
181182
WITH_LIBZIP: 'yes',
182183
WITH_SQLITE: 'yes',
183184
WITH_JSPI: 'no',
@@ -197,7 +198,6 @@ const platformDefaults = {
197198
},
198199
web: {},
199200
node: {
200-
WITH_CLI_SAPI: 'yes',
201201
WITH_NODEFS: 'yes',
202202
WITH_MYSQL: 'yes',
203203
},

packages/php-wasm/supported-php-versions.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @property {string} lastRelease
77
*/
88

9-
export const lastRefreshed = "2025-09-01T14:19:14.102Z";
9+
export const lastRefreshed = '2025-09-03T12:36:43.979Z';
1010

1111
/**
1212
* @type {PhpVersion[]}
@@ -60,5 +60,5 @@ export const phpVersions = [
6060
loaderFilename: 'php_7_2.js',
6161
wasmFilename: 'php_7_2.wasm',
6262
lastRelease: '7.2.34',
63-
}
63+
},
6464
];

packages/php-wasm/universal/src/lib/php-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';
22
import type { PHP } from './php';
33
import type { PHPRequestHandler } from './php-request-handler';
4-
import type { PHPResponse } from './php-response';
4+
import type { PHPResponse, StreamedPHPResponse } from './php-response';
55
import type {
66
PHPRequest,
77
PHPRunOptions,
95.6 KB
Binary file not shown.
96.2 KB
Binary file not shown.
99.7 KB
Binary file not shown.
108 KB
Binary file not shown.
111 KB
Binary file not shown.
115 KB
Binary file not shown.
16.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)