Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color message like the update tools #728

Merged
merged 2 commits into from
Jul 22, 2013
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 <info>"%s"</info> queries to update the database.', count($sqls)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why putting quotes around the number ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$output->writeln('Please run the operation by passing one - or both - of the following options:');

$output->writeln(sprintf(' <info>%s --force</info> to execute the command', $this->getName()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this already work with <CLI> help orm:schema-tool:drop ? Seems like a repetition here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, this is the same message, but with color around "num" queries, and options.

Without this PR,
DropCommand & UpdateCommand display the same content, but the presentation isn't the same..

$output->writeln(sprintf(' <info>%s --dump-sql</info> to dump the SQL statements to the screen', $this->getName()));

return 1;
}
Expand Down