Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-l…
…ine comments (chalasr) This PR was merged into the 2.8 branch. Discussion ---------- [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Pointed in #18564 (comment). Very-long-line comment: ```php SymfonyStyle::comment('Lorem ipsum ...'); ``` Before: ![](http://image.prntscr.com/image/9190081d7fd740a89d17a7247dbbb244.png) After: ![](http://image.prntscr.com/image/109c8c19c1574172bc22199ac90b6dd6.png) Multi-line comment: ```php SymfonyStyle::comment(['Lorem ipsum...', 'Lorem ipsum...']); ``` Before: ![](http://image.prntscr.com/image/24228f7e89e647b3a5d66fd83c7216cd.png) After: ![](http://image.prntscr.com/image/fe9320369fad45acab92564f0e5de344.png) Commits ------- 1c94fea [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
- Loading branch information
Showing
7 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
// This service is an alias for the service [32mservice_1[39m | ||
|
||
// This service is an alias for the service [32mservice_1[39m | ||
|
4 changes: 3 additions & 1 deletion
4
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
// This service is an alias for the service [32mservice_2[39m | ||
|
||
// This service is an alias for the service [32mservice_2[39m | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength; | ||
|
||
//Ensure that all lines are aligned to the begin of the first one and start with '//' in a very long line comment | ||
return function (InputInterface $input, OutputInterface $output) { | ||
$output = new SymfonyStyleWithForcedLineLength($input, $output); | ||
$output->comment( | ||
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum' | ||
); | ||
}; |
6 changes: 6 additions & 0 deletions
6
src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/output/output_11.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
// Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna | ||
// aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | ||
// Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur | ||
// sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters