From 0c3581a1f8343bb4ebeb683c018a2c1d175e01a8 Mon Sep 17 00:00:00 2001 From: Thomas Tourlourat Date: Fri, 19 Jul 2013 11:33:35 +0200 Subject: [PATCH 1/2] Color message like the update tools --- .../ORM/Tools/Console/Command/SchemaTool/DropCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php index 247bca1e463..a852194bcf1 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php @@ -115,8 +115,11 @@ protected function executeSchemaCommand(InputInterface $input, OutputInterface $ } if (count($sqls)) { - $output->writeln('Schema-Tool would execute ' . count($sqls) . ' queries to drop the database.'); - $output->writeln('Please run the operation with --force to execute these queries or use --dump-sql to see them.'); + $output->writeln(sprintf('The Schema-Tool would execute "%s" queries to update the database.', count($sqls))); + $output->writeln('Please run the operation by passing one - or both - of the following options:'); + + $output->writeln(sprintf(' %s --force to execute the command', $this->getName())); + $output->writeln(sprintf(' %s --dump-sql to dump the SQL statements to the screen', $this->getName())); return 1; } From 4882ff1ef5463c7b66deac9bfc8b464fb1fa6599 Mon Sep 17 00:00:00 2001 From: Thomas Tourlourat Date: Mon, 22 Jul 2013 17:11:53 +0200 Subject: [PATCH 2/2] Add info tag around ATTENTION --- .../ORM/Tools/Console/Command/SchemaTool/DropCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php index a852194bcf1..f7ba0687bfc 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php @@ -106,7 +106,7 @@ protected function executeSchemaCommand(InputInterface $input, OutputInterface $ return 0; } - $output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL); + $output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL); if ($isFullDatabaseDrop) { $sqls = $schemaTool->getDropDatabaseSQL();