* @see sfBaseTask */ class currentMigrationVersionTask extends sfBaseTask { protected function configure() { $this->addOptions(array( new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'), new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'), new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine'), )); $this->namespace = 'doctrine'; $this->name = 'current-migration-version'; $this->briefDescription = 'Display current migration version'; $this->detailedDescription = <<configuration); $connection = $databaseManager->getDatabase($options['connection'])->getConnection(); $migration = new Doctrine_Migration(dirname(__FILE__)); $this->logSection($this->name, $migration->getCurrentVersion()); } }