* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); /** * Upgrades a plugin. * * @package symfony * @subpackage task * @author Fabien Potencier * @version SVN: $Id: sfPluginUpgradeTask.class.php 23922 2009-11-14 14:58:38Z fabien $ */ class sfPluginUpgradeTask extends sfPluginBaseTask { /** * @see sfTask */ protected function configure() { $this->addArguments(array( new sfCommandArgument('name', sfCommandArgument::REQUIRED, 'The plugin name'), )); $this->addOptions(array( new sfCommandOption('stability', 's', sfCommandOption::PARAMETER_REQUIRED, 'The preferred stability (stable, beta, alpha)', null), new sfCommandOption('release', 'r', sfCommandOption::PARAMETER_REQUIRED, 'The preferred version', null), new sfCommandOption('channel', 'c', sfCommandOption::PARAMETER_REQUIRED, 'The PEAR channel name', null), )); $this->namespace = 'plugin'; $this->name = 'upgrade'; $this->briefDescription = 'Upgrades a plugin'; $this->detailedDescription = <<logSection('plugin', sprintf('upgrading plugin "%s"', $arguments['name'])); $this->getPluginManager()->installPlugin($arguments['name'], $options); } }