Skip to content

Commit 56a6030

Browse files
committed
Fix spawnHandler signature after merge
The sandboxedSpawnHandlerFactory now expects a getPHPInstance callback. Update boot.ts to use instanceManager instead of processManager and add a null check for requestHandler.
1 parent 983842a commit 56a6030

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/playground/cli/src/blueprints-v2/worker-thread-v2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ export class PlaygroundCliBlueprintV2Worker extends PHPWorker {
469469
constants,
470470
phpIniEntries,
471471
cookieStore: false,
472-
spawnHandler: sandboxedSpawnHandlerFactory,
472+
spawnHandler: (getPHPInstance) =>
473+
sandboxedSpawnHandlerFactory(getPHPInstance),
473474
});
474475
this.__internal_setRequestHandler(requestHandler);
475476

packages/playground/wordpress/src/boot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ export async function bootRequestHandler(options: BootRequestHandlerOptions) {
420420

421421
// Spawn handler is responsible for spawning processes for all the
422422
// `popen()`, `proc_open()` etc. calls.
423-
if (spawnHandler) {
423+
if (spawnHandler && requestHandler) {
424424
await php.setSpawnHandler(
425425
spawnHandler(() =>
426-
requestHandler.processManager.acquirePHPInstance({
426+
requestHandler.instanceManager.acquirePHPInstance({
427427
considerPrimary: false,
428428
})
429429
)

0 commit comments

Comments
 (0)