From 972c4caae856cb1d437e335f00463d3560599de6 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 6 Dec 2015 23:25:30 +0100 Subject: [PATCH] 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} */