diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php new file mode 100644 index 0000000000000..da402332d5f47 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bundle\FrameworkBundle\Command; + +/** + * Base methods for commands related to PHP's built-in web server. + * + * @author Christian Flothmann + */ +abstract class ServerCommand extends ContainerAwareCommand +{ + /** + * {@inheritdoc} + */ + public function isEnabled() + { + if (version_compare(phpversion(), '5.4.0', '<') || defined('HHVM_VERSION')) { + return false; + } + + return parent::isEnabled(); + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index f8faaf7658f31..303a170832cb4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -22,20 +22,8 @@ * * @author MichaƂ Pipa */ -class ServerRunCommand extends ContainerAwareCommand +class ServerRunCommand extends ServerCommand { - /** - * {@inheritdoc} - */ - public function isEnabled() - { - if (version_compare(phpversion(), '5.4.0', '<') || defined('HHVM_VERSION')) { - return false; - } - - return parent::isEnabled(); - } - /** * {@inheritdoc} */