-
Notifications
You must be signed in to change notification settings - Fork 93
Feature/command obsolete #173
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
Conversation
lsv
commented
Dec 31, 2017
- Setting the php_translation.storage.default to public, due to its required by the obsolete command
- Updated obsolete command, so you will get better overview of what has been removed if you add -v
- Dont ask for anything if there are 0 obsolete messages
- Dont add progressbar if -q is added
Nyholm
left a comment
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.
Thanks! I just had some minor comments
| $container->setAlias('php_translation.storage', new Alias('php_translation.storage.'.$first, true)); | ||
| if ('default' !== $first) { | ||
| $container->setAlias('php_translation.storage.default', 'php_translation.storage.'.$first); | ||
| $container->setAlias('php_translation.storage.default', new Alias('php_translation.storage.'.$first, true)); |
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 do not mind. But we should remember to make it private before 1.0. We should register commands and controllers as proper services.
Command/DeleteObsoleteCommand.php
Outdated
| if ($progress) { | ||
| $progress->finish(); | ||
| } | ||
| exit(0); |
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.
We should use return instead. This will not run command.terminate or other listeners
Command/DeleteObsoleteCommand.php
Outdated
| return; | ||
| } | ||
| $messageCount = count($messages); | ||
| if ($messageCount > 0) { |
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.
Could we make this a bit prettier by doing:
if ($messageCount === 0) {
$output->writeln('No messages are obsolete');
return;
}|
Could you have a look at the changes and I'll be happy to merge. |
|
I've made the changes. Thank you for creating this PR. |