bug #23686 [Console][WebServerBundle] Use "exec" when possible (nicolas-grekas)
This PR was merged into the 3.3 branch.
Discussion
----------
[Console][WebServerBundle] Use "exec" when possible
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23568
| License | MIT
| Doc PR | -
Commits
-------
7b6d8948ce
[Console][WebServerBundle] Use "exec" when possible
This commit is contained in:
commit
b5c7319084
@ -13,7 +13,6 @@ namespace Symfony\Bundle\WebServerBundle;
|
||||
|
||||
use Symfony\Component\Process\PhpExecutableFinder;
|
||||
use Symfony\Component\Process\Process;
|
||||
use Symfony\Component\Process\ProcessBuilder;
|
||||
use Symfony\Component\Process\Exception\RuntimeException;
|
||||
|
||||
/**
|
||||
@ -151,11 +150,11 @@ class WebServer
|
||||
throw new \RuntimeException('Unable to find the PHP binary.');
|
||||
}
|
||||
|
||||
$builder = new ProcessBuilder(array($binary, '-S', $config->getAddress(), $config->getRouter()));
|
||||
$builder->setWorkingDirectory($config->getDocumentRoot());
|
||||
$builder->setTimeout(null);
|
||||
$process = new Process(array($binary, '-S', $config->getAddress(), $config->getRouter()));
|
||||
$process->setWorkingDirectory($config->getDocumentRoot());
|
||||
$process->setTimeout(null);
|
||||
|
||||
return $builder->getProcess();
|
||||
return $process;
|
||||
}
|
||||
|
||||
private function getDefaultPidFile()
|
||||
|
@ -17,9 +17,9 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"symfony/console": "~2.8.8|~3.0.8|~3.1.2|~3.2",
|
||||
"symfony/console": "~3.3",
|
||||
"symfony/http-kernel": "~3.3",
|
||||
"symfony/process": "~2.8|~3.0"
|
||||
"symfony/process": "~3.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Bundle\\WebServerBundle\\": "" },
|
||||
|
Reference in New Issue
Block a user