Skip to content

Commit 398e0c7

Browse files
committed
Remove instanceManager config option from PHPRequestHandler
Simplify PHPRequestHandler configuration to only two options: - php: Single PHP instance (creates SinglePHPInstanceManager internally) - phpFactory + maxPhpInstances: Factory function (creates PHPProcessManager) The instanceManager option was overly complex for actual use cases.
1 parent 1481e4c commit 398e0c7

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

packages/php-wasm/universal/src/lib/php-request-handler.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,6 @@ export type PHPRequestHandlerFactoryArgs = PHPFactoryOptions & {
8989
export type PHPRequestHandlerConfiguration = BaseConfiguration & {
9090
cookieStore?: CookieStore | false;
9191
} & (
92-
| {
93-
/**
94-
* Provide a custom instance manager for advanced use cases.
95-
* Use SinglePHPInstanceManager for CLI contexts with a single PHP instance.
96-
* Use PHPProcessManager for web contexts with multiple concurrent instances.
97-
*/
98-
instanceManager: PHPInstanceManager;
99-
}
10092
| {
10193
/**
10294
* Provide a single PHP instance directly.
@@ -214,9 +206,7 @@ export class PHPRequestHandler implements AsyncDisposable {
214206
getFileNotFoundAction = () => ({ type: '404' }),
215207
} = config;
216208

217-
if ('instanceManager' in config) {
218-
this.processManager = config.instanceManager;
219-
} else if ('php' in config) {
209+
if ('php' in config) {
220210
const php = config.php;
221211

222212
// Always set managed PHP's cwd to the document root.

0 commit comments

Comments
 (0)