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

[Console][WebServerBundle] Use "exec" when possible #23686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2017
Merged
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
9 changes: 4 additions & 5 deletions 9 src/Symfony/Bundle/WebServerBundle/WebServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\ProcessBuilder;
use Symfony\Component\Process\Exception\RuntimeException;

/**
Expand Down Expand Up @@ -151,11 +150,11 @@ private function createServerProcess(WebServerConfig $config)
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);
Copy link
Member

@chalasr chalasr Jul 26, 2017

Choose a reason for hiding this comment

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

return new Process(array($binary, '-S', $config->getAddress(), $config->getRouter()), $config->getDocumentRoot(), null, null); btw?

Copy link
Member Author

Choose a reason for hiding this comment

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

More readable as is to me.

Copy link
Member

Choose a reason for hiding this comment

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

right!


return $builder->getProcess();
return $process;
}

private function getDefaultPidFile()
Expand Down
4 changes: 2 additions & 2 deletions 4 src/Symfony/Bundle/WebServerBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member Author

Choose a reason for hiding this comment

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

there is no need to keep pre-3.3 deps for 3.3-introduced bundles IMHO, that makes things easier

"symfony/http-kernel": "~3.3",
"symfony/process": "~2.8|~3.0"
"symfony/process": "~3.3"
},
"autoload": {
"psr-4": { "Symfony\\Bundle\\WebServerBundle\\": "" },
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.