8000 Web server bundle by fabpot · Pull Request #21039 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Web server bundle #21039

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

Merged
merged 10 commits into from
Jan 6, 2017
Prev Previous commit
Next Next commit
[WebServerBundle] tweaked command docs
  • Loading branch information
fabpot committed Dec 30, 2016
commit 585d4451c87fb610cbc14c9fe83c462eedad503a
10 changes: 3 additions & 7 deletions src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,18 @@ protected function configure()

<info>%command.full_name%</info>

To change default bind address and port use the <info>address</info> argument:
Change the default address and port by passing them as an argument:

<info>%command.full_name% 127.0.0.1:8080</info>

To change default docroot directory use the <info>--docroot</info> option:
Use the <info>--docroot</info> option to change the default docroot directory:

<info>%command.full_name% --docroot=htdocs/</info>

If you have custom docroot directory layout, you can specify your own
router script using <info>--router</info> option:
Specify your own router script via the <info>--router</info> option:

<info>%command.full_name% --router=app/config/router.php</info>

Specifing a router script is required when the used environment is not "dev",
"prod", or "test".

See also: http://www.php.net/manual/en/features.commandline.webserver.php
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,18 @@ protected function configure()

<info>php %command.full_name%</info>

To change the default bind address and 8000 the default port use the <info>address</info> argument:
Change the default address and port by passing them as an argument:

<info>php %command.full_name% 127.0.0.1:8080</info>

To change the default document root directory use the <info>--docroot</info> option:
Use the <info>--docroot</info> option to change the default docroot directory:

<info>php %command.full_name% --docroot=htdocs/</info>

If you have a custom document root directory layout, you can specify your own
router script using the <info>--router</info> option:
Specify your own router script via the <info>--router</info> option:

<info>php %command.full_name% --router=app/config/router.php</info>

Specifying a router script is required when the used environment is not <comment>"dev"</comment> or
<comment>"prod"</comment>.

See also: http://www.php.net/manual/en/features.commandline.webserver.php
EOF
)
Expand Down
7 changes: 3 additions & 4 deletions src/Symfony/Bundle/WebServerBundle/WebServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ public function start($router = null)
$process->disableOutput();
$process->start();

$lockFile = $this->getLockFile();
touch($lockFile);

if (!$process->isRunning()) {
unlink($lockFile);
throw new \RuntimeException('Unable to start the server process.');
}

$lockFile = $this->getLockFile();
touch($lockFile);

// stop the web server when the lock file is removed
while ($process->isRunning()) {
if (!file_exists($lockFile)) {
Expand Down
0