[WebServerBundle] tweaked command docs
This commit is contained in:
parent
fa7ebc57de
commit
585d4451c8
@ -44,22 +44,18 @@ The <info>%command.name%</info> runs a local web server:
|
||||
|
||||
<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
|
||||
)
|
||||
|
@ -43,22 +43,18 @@ The <info>%command.name%</info> runs a local web server:
|
||||
|
||||
<info>php %command.full_name%</info>
|
||||
|
||||
To change the default bind address and 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
|
||||
)
|
||||
|
@ -120,14 +120,13 @@ class WebServer
|
||||
$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)) {
|
||||
|
Reference in New Issue
Block a user