Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit 98a584e

Browse filesBrowse files
committed
minor #284 Use 'server:start' instead of 'server:run' when possible (javiereguiluz)
This PR was squashed before being merged into the 1.0-dev branch (closes #284). Discussion ---------- Use 'server:start' instead of 'server:run' when possible `server:start` is a better option ... but it's not always possible to run it. Commits ------- a455eeb Use 'server:start' instead of 'server:run' when possible
2 parents ff32aac + a455eeb commit 98a584e
Copy full SHA for 98a584e

File tree

Expand file treeCollapse file tree

2 files changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-4
lines changed

‎src/Symfony/Installer/DemoCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Installer/DemoCommand.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,13 @@ private function displayInstallationResult()
148148
));
149149
}
150150

151+
$serverRunCommand = extension_loaded('pcntl') ? 'server:start' : 'server:run';
152+
151153
$this->output->writeln(sprintf(
152154
" 1. Change your current directory to <comment>%s</comment>\n\n".
153-
" 2. Execute the <comment>php bin/console server:run</comment> command to run the demo application.\n\n".
155+
" 2. Execute the <comment>php bin/console %s</comment> command to run the demo application.\n\n".
154156
" 3. Browse to the <comment>http://localhost:8000</comment> URL to see the demo application in action.\n\n",
155-
$this->projectDir
157+
$this->projectDir, $serverRunCommand
156158
));
157159

158160
return $this;

‎src/Symfony/Installer/NewCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Installer/NewCommand.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,15 @@ protected function displayInstallationResult()
259259
}
260260

261261
$consoleDir = ($this->isSymfony3() ? 'bin' : 'app');
262+
$serverRunCommand = version_compare($this->version, '2.6.0', '>=') && extension_loaded('pcntl') ? 'server:start' : 'server:run';
262263

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

272273
return $this;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.