Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c1aa7b5

Browse filesBrowse files
committed
bug #44915 [Console] Fix compact table style to avoid outputting a leading space (Seldaek)
This PR was merged into the 4.4 branch. Discussion ---------- [Console] Fix compact table style to avoid outputting a leading space | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> This changes the `compact` output from: ``` a b \n foo bar \n ``` To: ``` a b \n foo bar \n ``` Note the only difference is the leading space which is not there anymore. IMO this is a much better default, but I do understand it changes something which has been as it is for ages, which may be considered a BC break more than a bugfix. Commits ------- 5ffedf5 [Console] Fix compact table style to avoid outputting a leading space
2 parents f1f123b + 5ffedf5 commit c1aa7b5
Copy full SHA for c1aa7b5

File tree

2 files changed

+7
-7
lines changed
Filter options

2 files changed

+7
-7
lines changed

‎src/Symfony/Component/Console/Helper/Table.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/Table.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,9 +804,9 @@ private static function initStyles(): array
804804
$compact = new TableStyle();
805805
$compact
806806
->setHorizontalBorderChars('')
807-
->setVerticalBorderChars(' ')
807+
->setVerticalBorderChars('')
808808
->setDefaultCrossingChar('')
809-
->setCellRowContentFormat('%s')
809+
->setCellRowContentFormat('%s ')
810810
;
811811

812812
$styleGuide = new TableStyle();

‎src/Symfony/Component/Console/Tests/Helper/TableTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Helper/TableTest.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ public function renderProvider()
118118
$books,
119119
'compact',
120120
<<<'TABLE'
121-
ISBN Title Author
122-
99921-58-10-7 Divine Comedy Dante Alighieri
123-
9971-5-0210-0 A Tale of Two Cities Charles Dickens
124-
960-425-059-0 The Lord of the Rings J. R. R. Tolkien
125-
80-902734-1-6 And Then There Were None Agatha Christie
121+
ISBN Title Author
122+
99921-58-10-7 Divine Comedy Dante Alighieri
123+
9971-5-0210-0 A Tale of Two Cities Charles Dickens
124+
960-425-059-0 The Lord of the Rings J. R. R. Tolkien
125+
80-902734-1-6 And Then There Were None Agatha Christie
126126

127127
TABLE
128128
],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.