From d18fb9bbbe2dd2893da4663e8350d8590146071d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Faugeron?= Date: Tue, 24 Nov 2015 11:52:35 +0000 Subject: [PATCH 1/3] Suggested Process dependency The `server:run` command requires the Process component. --- src/Symfony/Bundle/FrameworkBundle/composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 29ff39c46f..a8c772ec68 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -54,7 +54,8 @@ "symfony/serializer": "For using the serializer service", "symfony/validator": "For using validation", "symfony/yaml": "For using the debug:config and lint:yaml commands", - "doctrine/cache": "For using alternative cache drivers" + "doctrine/cache": "For using alternative cache drivers", + "symfony/process": "For using the server:run command" }, "autoload": { "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, From dd82b6459dd7dd8967c8dfbfb49f67dd0c66a5fd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 6 Dec 2015 23:23:13 +0100 Subject: [PATCH 2/3] list all server command names in suggestion --- src/Symfony/Bundle/FrameworkBundle/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index a8c772ec68..90c3619e4d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -55,7 +55,7 @@ "symfony/validator": "For using validation", "symfony/yaml": "For using the debug:config and lint:yaml commands", "doctrine/cache": "For using alternative cache drivers", - "symfony/process": "For using the server:run command" + "symfony/process": "For using the server:run, server:start, server:stop, and server:status commands" }, "autoload": { "psr-4": { "Symfony\\Bundle\\FrameworkBundle\\": "" }, From 972c4caae856cb1d437e335f00463d3560599de6 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 6 Dec 2015 23:25:30 +0100 Subject: [PATCH 3/3] disable server commands without Process component --- .../Bundle/FrameworkBundle/Command/ServerCommand.php | 4 ++++ .../FrameworkBundle/Command/ServerRunCommand.php | 12 ------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php index b979a19f0f..acf71c6666 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php @@ -27,6 +27,10 @@ abstract class ServerCommand extends ContainerAwareCommand return false; } + if (!class_exists('Symfony\Component\Process\Process')) { + return false; + } + return parent::isEnabled(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 6af52feaae..78b0bd4ee2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -25,18 +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; - } - - return parent::isEnabled(); - } - /** * {@inheritdoc} */