[11.x] Fix serve command with PHP_CLI_SERVER_WORKERS#54606
[11.x] Fix serve command with PHP_CLI_SERVER_WORKERS#54606taylorotwell merged 10 commits into11.xfrom
serve command with PHP_CLI_SERVER_WORKERS#54606Conversation
By default, serve command would restart child process when there's modification to the `.env` file. However, with `PHP_CLI_SERVER_WORKERS` set to larger than 1 the process doesn't close properly (port is still being used) and this cause the restart process to pick an incremented port number. The changes here will unset `PHP_CLI_SERVER_WORKERS` value unless the command is executed with `--no-reload` option. fixes #54574 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
serve command with PHP_CLI_SERVER_WORKERSserve command with PHP_CLI_SERVER_WORKERS
|
Hey there. Apologies for necroing this PR/thread. However I do have a few questions regarding the changes made here. If this isn't the appropriate place to ask, I'm happy to ask where ever you recommend me to. Now I am wondering why it has been chosen to silently ignore a configuration value under fairly intransparent conditions (I mean the code is clear, but to people not knowing this code, the conditions are very unclear) instead of addressing the underlying issue at hand. Additionally is there documentation for this behavior? I'm not saying there isn't any, just that I haven't come across any mention during my multi hour deep dive into why an update of Laravel suddenly caused timeouts in my dev server (which eventually lead me down the path of debugging why |
By default, serve command would restart child process when there's modification to the
.envfile. However, withPHP_CLI_SERVER_WORKERSset to larger than 1 the process doesn't close properly (port is still being used) and this cause the restart process to pick an incremented port number.The changes here will unset
PHP_CLI_SERVER_WORKERSvalue unless the command is executed with--no-reloadoption.fixes #54574