Conversation
806043f to
4f33a23
Compare
|
I'm testing it now. |
|
It works as expected now. |
| return await Promise.resolve().then(() => (init_php_7_22(), php_7_2_exports2)); | ||
| } | ||
| } | ||
| - throw new Error(`Unsupported PHP version ${version}`); |
There was a problem hiding this comment.
I think we shouldn’t remove this error that is thrown when the PHP version isn’t supported.
There was a problem hiding this comment.
Well spotted! I think that was removed by mistake. I'll add it back
There was a problem hiding this comment.
I followed the test instructions and confirm the npm install applied the patch and I was able to start and stop a site with Xdebug:
Applying patches...
@php-wasm/node@3.0.22 ✔
pm2@6.0.14 ✔
ps-man@1.1.8 ✔
I just noticed that we are removing the error when the PHP version is not supported. throw new Error(`Unsupported PHP version ${version}`);. I suggest adding it back or explaining why that's necessary in .js and not in .cjs
That was a great catch @sejas! For some reason, my IDE is deleting that line when updating the file, but I have managed to add it back, as it is unrelated to the patch. The updated patch can be found in #2416 |
Related issues
Related to STU-1183
Fix also suggested to the affected package WordPress/wordpress-playground#3125
Proposed Changes
@php-wasm/nodeto fix the timeout when starting sites with XDebug enabled using the packaged app.Testing Instructions
cd cliandnpm installto install CLI dependencies@php-wasmpatch is applied, the following should be logged to the terminal:cd .., deletenode_modulesso the previous patch is applied.npm installto install main depsnpm startnpm run maketo package the applicationoutfolder in the root of the repo, open your platform folder (e.g.Studio-darwin-arm64) and runStudio.appTest debugging in IDE
Copied from the original PR #2242
I used PhpStorm:
/wordpressPre-merge Checklist