Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Use 'server:start' instead of 'server:run' when possible #284

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Symfony/Installer/DemoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,13 @@ private function displayInstallationResult()
));
}

$serverRunCommand = extension_loaded('pcntl') ? 'server:start' : 'server:run';

$this->output->writeln(sprintf(
" 1. Change your current directory to <comment>%s</comment>\n\n".
" 2. Execute the <comment>php bin/console server:run</comment> command to run the demo application.\n\n".
" 2. Execute the <comment>php bin/console %s</comment> command to run the demo application.\n\n".
" 3. Browse to the <comment>http://localhost:8000</comment> URL to see the demo application in action.\n\n",
$this->projectDir
$this->projectDir, $serverRunCommand
));

return $this;
Expand Down
5 changes: 3 additions & 2 deletions src/Symfony/Installer/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,15 @@ protected function displayInstallationResult()
}

$consoleDir = ($this->isSymfony3() ? 'bin' : 'app');
$serverRunCommand = version_compare($this->version, '2.6.0', '>=') && extension_loaded('pcntl') ? 'server:start' : 'server:run';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to check for HHVM.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should care about HHVM anymore. "Nobody" is using it.


$this->output->writeln(sprintf(
" * Configure your application in <comment>app/config/parameters.yml</comment> file.\n\n".
" * Run your application:\n".
" 1. Execute the <comment>php %s/console server:run</comment> command.\n".
" 1. Execute the <comment>php %s/console %s</comment> command.\n".
" 2. Browse to the <comment>http://localhost:8000</comment> URL.\n\n".
" * Read the documentation at <comment>http://symfony.com/doc</comment>\n",
$consoleDir
$consoleDir, $serverRunCommand
));

return $this;
Expand Down