Skip to content

Conversation

@lsv
Copy link
Contributor

@lsv 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 Nyholm self-requested a review December 31, 2017 14:09
Copy link
Member

@Nyholm Nyholm left a 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));
Copy link
Member

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.

if ($progress) {
$progress->finish();
}
exit(0);
Copy link
Member

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

return;
}
$messageCount = count($messages);
if ($messageCount > 0) {
Copy link
Member

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;
}

@Nyholm
Copy link
Member

Nyholm commented Jan 6, 2018

Could you have a look at the changes and I'll be happy to merge.

@Nyholm Nyholm merged commit 4052354 into php-translation:master Feb 4, 2018
@Nyholm
Copy link
Member

Nyholm commented Feb 4, 2018

I've made the changes. Thank you for creating this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants