-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Table helper vertical rendering #41595
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
Comments
Thank you for this suggestion. |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
GromNaN
added a commit
that referenced
this issue
May 9, 2022
This PR was merged into the 6.1 branch. Discussion ---------- [Console] Table vertical rendering | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #41595 | License | MIT | Doc PR | This PR adds a way to render Console Tables vertically. This is inspired by the way MySQL and PostgreSQL do with the '\G' command terminator. For example, if we use this vertical rendering for the command `debug:validator`, the command would show something like: ```bash App\Entity\Foo ------------------- +---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Property: bar | | Name: Symfony\Component\Validator\Constraints\Length | | Groups: Default, Foo | | Options: [ | | "maxMessage" => "This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.", | | "minMessage" => "This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.", | | "exactMessage" => "This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.", | | "charsetMessage" => "This value does not match the expected {{ charset }} charset.", | | "max" => 75, | | "min" => 2, | | "charset" => "UTF-8", | | "normalizer" => null, | | "allowEmptyString" => false, | | "payload" => null | | ] | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ... | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ``` Instead of : ```bash App\Entity\Foo ------------------- +----------+------------------------------------------------+------------------------------------------------+----------------------------------------------------------------------------------+ | Property | Name | Groups | Options | +----------+------------------------------------------------+------------------------------------------------+----------------------------------------------------------------------------------+ | bar | Symfony\Component\Validator\Constraints\Length | Default, Foo | [ | | | | | "maxMessage" => "This value | | | | | is too long. It should have {{ limit }} character or less.|This value is too lon | | | | | g. It should have {{ limit }} characters or less.", | | | | | "minMessage" => "This value | | | | | is too short. It should have {{ limit }} character or more.|This value is too sh | | | | | ort. It should have {{ limit }} characters or more.", | | | | 63E5 | "exactMessage" => "This valu | | | | | e should have exactly {{ limit }} character.|This value should have exactly {{ l | | | | | imit }} characters.", | | | | | "charsetMessage" => "This va | | | | | lue does not match the expected {{ charset }} charset.", | | | | | "max" => 75, | | | | | "min" => 2, | | | | | "charset" => "UTF-8 | | | | | 208m", | | | | | "normalizer" => null | | | | | ;208m, | | | | | "allowEmptyString" => false | | | | | [0;38;5;208m, | | | | | "payload" => null | | | | | 8m | | | | | ] | ... +----------+------------------------------------------------+------------------------------------------------+----------------------------------------------------------------------------------+ ``` Which is hard to read. Commits ------- 15fa4c5 Console Table vertical rendering
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The usage of large Tables in console especially on small screens (like my laptop unfortunately) is not pleasant and hard to use (like the
bin/console debug:validator src/
command which prints a huge table hard to read).What do you think about having a system like mysql or postgresql have (with the "\G" terminator) that would convert the original direction output into a vertical way?
Example
Would become :
It could be a parameter to set as does
setHorizontal()
The text was updated successfully, but these errors were encountered: