Skip to content

Commit b5c7319

Browse files
committed
bug symfony#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 | symfony#23568 | License | MIT | Doc PR | - Commits ------- 7b6d894 [Console][WebServerBundle] Use "exec" when possible
2 parents dd9b5eb + 7b6d894 commit b5c7319

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Symfony/Bundle/WebServerBundle/WebServer.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Process\PhpExecutableFinder;
1515
use Symfony\Component\Process\Process;
16-
use Symfony\Component\Process\ProcessBuilder;
1716
use Symfony\Component\Process\Exception\RuntimeException;
1817

1918
/**
@@ -151,11 +150,11 @@ private function createServerProcess(WebServerConfig $config)
151150
throw new \RuntimeException('Unable to find the PHP binary.');
152151
}
153152

154-
$builder = new ProcessBuilder(array($binary, '-S', $config->getAddress(), $config->getRouter()));
155-
$builder->setWorkingDirectory($config->getDocumentRoot());
156-
$builder->setTimeout(null);
153+
$process = new Process(array($binary, '-S', $config->getAddress(), $config->getRouter()));
154+
$process->setWorkingDirectory($config->getDocumentRoot());
155+
$process->setTimeout(null);
157156

158-
return $builder->getProcess();
157+
return $process;
159158
}
160159

161160
private function getDefaultPidFile()

src/Symfony/Bundle/WebServerBundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
],
1818
"require": {
1919
"php": ">=5.5.9",
20-
"symfony/console": "~2.8.8|~3.0.8|~3.1.2|~3.2",
20+
"symfony/console": "~3.3",
2121
"symfony/http-kernel": "~3.3",
22-
"symfony/process": "~2.8|~3.0"
22+
"symfony/process": "~3.3"
2323
},
2424
"autoload": {
2525
"psr-4": { "Symfony\\Bundle\\WebServerBundle\\": "" },

0 commit comments

Comments
 (0)