From fbb785274ccf5f43e65d5215ea733e4c69f239ec Mon Sep 17 00:00:00 2001 From: William DURAND Date: Mon, 5 Sep 2011 00:15:47 +0200 Subject: [PATCH] [command] Fixed build command information --- Command/BuildCommand.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Command/BuildCommand.php b/Command/BuildCommand.php index 79c0c13..ea5b9d3 100644 --- a/Command/BuildCommand.php +++ b/Command/BuildCommand.php @@ -13,6 +13,7 @@ namespace Propel\PropelBundle\Command; use Propel\PropelBundle\Command\PhingCommand; use Propel\PropelBundle\Command\BuildModelCommand; use Propel\PropelBundle\Command\BuildSqlCommand; + use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; @@ -27,18 +28,16 @@ use Symfony\Component\Console\Output\Output; */ class BuildCommand extends PhingCommand { - protected $additionalPhingArgs = array(); - /** * @see Command */ protected function configure() { $this - ->setDescription('Hub for Propel build commands (model, sql)') + ->setDescription('Hub for Propel build commands (Model classes, SQL)') ->setDefinition(array( new InputOption('classes', '', InputOption::VALUE_NONE, 'Build only classes'), - new InputOption('sql', '', InputOption::VALUE_NONE, 'Build only code'), + new InputOption('sql', '', InputOption::VALUE_NONE, 'Build only SQL'), new InputOption('insert-sql', '', InputOption::VALUE_NONE, 'Build all and insert SQL'), new InputOption('connection', null, InputOption::VALUE_OPTIONAL, 'Set this parameter to define a connection to use') )) @@ -53,21 +52,18 @@ class BuildCommand extends PhingCommand protected function execute(InputInterface $input, OutputInterface $output) { if (!$input->getOption('sql')) { - $output->writeln('Building model classes:'); $modelCommand = new BuildModelCommand(); $modelCommand->setApplication($this->getApplication()); $modelCommand->execute($input, $output); } if (!$input->getOption('classes')) { - $output->writeln('Building model sql:'); $sqlCommand = new BuildSQLCommand(); $sqlCommand->setApplication($this->getApplication()); $sqlCommand->execute($input, $output); } if ($input->getOption('insert-sql')) { - $output->writeln('Inserting SQL statements:'); $insertCommand = new InsertSqlCommand(); $insertCommand->setApplication($this->getApplication());