-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Applied new styles to translation commands #14595
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
Fabbot report had no relation with the purpose of this PR. But in case it would be appreciated, it's fixed, could be squashed, or reverted on demand. |
if (false !== strpos($input->getFirstArgument(), ':d')) { | ||
$output->writeln('<comment>The use of "translation:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:translation" instead.</comment>'); | ||
$output->newLine(); |
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.
write and then add a new line
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 you remove all unnecessary newLine
calls, as the new SymfonyStyle handle this.
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.
Actually, all those newLine
calls are here in order to have the command output preceded and followed by 1 blank line, to increase readability and separate output of different commands, which is not fully handled by SymfonyStyle.
Do you still want me to remove them ?
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 think so, if there is a such case why not improving SymfonyStyle
instead.
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.
Sure, you're right. I didn't dig into this problem for now but I'm not sure that's as trivial as it seems.
I'll update this PR as you advised me right now.
use |
👍 |
@ogizanagi Can you please rebase to (hopefully) trigger a successful build? |
@xabbuh : Sure. It's done. Let's see if Travis is happy :) |
@@ -85,8 +85,9 @@ protected function configure() | |||
*/ | |||
protected function execute(InputInterface $input, OutputInterface $output) | |||
{ | |||
$output = new SymfonyStyle($input, $output); |
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.
Imho we should choose another name here and not override one of the method arguments.
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.
It was already mentioned here #14132 (comment) but I'm not sure about it
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.
Well, I don't know. We started this debate over here: #14132 (comment), but no result for now.
I'm not convinced, as SymfonyStyle acts as a pseudo-decorator, and fully replace the output for the whole command (IMO it's even better, by avoiding using the non-decorated output by error and "mix styles").
Edit: aitboudad was faster :)
Thank you @ogizanagi. |
…ands (ogizanagi) This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Applied new styles to translation commands | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | Partially #14138 | License | MIT | Doc PR | - ## Translation debug _Only the table layout and deprecation note is changed_   ## Translation update ### Before:  ### After:     Commits ------- 812fedc [FrameworkBundle] Applied new styles to translation commands
Translation debug
Only the table layout and deprecation note is changed
Translation update
Before:
After: