-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] [TableHelper] make it work with SymfonyStyle. #18581
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
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | no |
Fixed tickets | #18573 |
License | MIT |
Doc PR | ~ |
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; | ||
use Symfony\Component\Console\Helper\TableCell; | ||
|
||
//Ensure questions do not output anything when input is non-interactive |
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.
This comment needs to be updated.
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.
done
👍 |
@@ -204,7 +205,16 @@ public function caution($message) | |||
*/ | |||
public function table(array $headers, array $rows) | |||
{ | |||
$headers = array_map(function ($value) { return sprintf('<info>%s</>', $value); }, $headers); | |||
array_walk_recursive($headers, function (&$value) { |
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.
recursive
required? Then should we add a test case which would trigger this recursive part?
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.
not really recusive, but it can be one/two-dimensional array which is already covered by test
👍 |
Thank you @aitboudad. |
…itboudad) This PR was merged into the 2.7 branch. Discussion ---------- [Console] [TableHelper] make it work with SymfonyStyle. | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #18573 | License | MIT | Doc PR | ~ Commits ------- 43cc93c [Console] [TableHelper] make it work with SymfonyStyle.
Question.. would a |
@aitboudad any thoughts on this? |