Skip to content
Closed
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
32 changes: 32 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* 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 <christian.flothmann@xabbuh.de>
*/
abstract class ServerCommand extends ContainerAwareCommand
{
/**
* {@inheritdoc}
*/
public function isEnabled()
{
if (version_compare(phpversion(), '5.4.0', '<') || defined('HHVM_VERSION')) {
return false;
}

return parent::isEnabled();
}
}
14 changes: 1 addition & 13 deletions src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,8 @@
*
* @author Michał Pipa <michal.pipa.xsolve@gmail.com>
*/
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}
*/
Expand Down