-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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))); | ||
$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())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this already work with There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, |
||
$output->writeln(sprintf(' <info>%s --dump-sql</info> to dump the SQL statements to the screen', $this->getName())); | ||
|
||
return 1; | ||
} | ||
|
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copy/past from UpdateCommand : https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php#L147#L151