bug #16871 [FrameworkBundle] Disable built-in server commands when Process component is missing (gnugat, xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Disable built-in server commands when Process component is missing | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This also backports the improvement for the `suggest` section from #16650 to the `2.7` branch and improves it by also mentioning the other built-in server commands. Commits -------972c4ca
disable server commands without Process componentdd82b64
list all server command names in suggestiond18fb9b
Suggested Process dependency
This commit is contained in:
commit
b8fbe69bb8
@ -27,6 +27,10 @@ abstract class ServerCommand extends ContainerAwareCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!class_exists('Symfony\Component\Process\Process')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return parent::isEnabled();
|
||||
}
|
||||
|
||||
|
@ -25,22 +25,6 @@ use Symfony\Component\Process\ProcessBuilder;
|
||||
*/
|
||||
class ServerRunCommand extends ServerCommand
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
if (PHP_VERSION_ID < 50400 || defined('HHVM_VERSION')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!class_exists('Symfony\Component\Process\Process')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return parent::isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
@ -54,7 +54,7 @@
|
||||
"symfony/serializer": "For using the serializer service",
|
||||
"symfony/validator": "For using validation",
|
||||
"symfony/yaml": "For using the debug:config and lint:yaml commands",
|
||||
"symfony/process": "For using the server:run command",
|
||||
"symfony/process": "For using the server:run, server:start, server:stop, and server:status commands",
|
||||
"doctrine/cache": "For using alternative cache drivers"
|
||||
},
|
||||
"autoload": {
|
||||
|
Reference in New Issue
Block a user