-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[11.x] Fix serve
command with PHP_CLI_SERVER_WORKERS
#54606
Conversation
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 <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
serve
command with PHP_CLI_SERVER_WORKERS
serve
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
.env
file. However, withPHP_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