8000 minor #27542 [WebServerBundle] Improve the error message when web ser… · symfony/symfony@1df0a69 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1df0a69

Browse files
committed
minor #27542 [WebServerBundle] Improve the error message when web server is already running (Nyholm)
This PR was squashed before being merged into the 4.2-dev branch (closes #27542). Discussion ---------- [WebServerBundle] Improve the error message when web server is already running | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | na I understand that this change seams weird. I've just been in a training where 3 sets of eyes did not figure out why the web server did not start. We where faced with the message: > The web server is already running (listening on http://127.0.0.1:8000). Which I read as: > There is already an other service listening on port 8000. I know I have myself to blame for not reading properly. But I feel this could be improved some how. So here is a suggestion. I updated the message and I made it a warning. Commits ------- b79f38c [WebServerBundle] Improve the error message when web server is already running
2 parents 50c4384 + b79f38c commit 1df0a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
135135
try {
136136
$server = new WebServer();
137137
if ($server->isRunning($input->getOption('pidfile'))) {
138-
$io->error(sprintf('The web server is already running (listening on http://%s).', $server->getAddress($input->getOption('pidfile'))));
138+
$io->error(sprintf('The web server has already been started. It is currently listening on http://%s. Please stop the web server before you try to start it again.', $server->getAddress($input->getOption('pidfile'))));
139139

140140
return 1;
141141
}

0 commit comments

Comments
 (0)
0