Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Console] SymfonyStyle: Align multi-line/very-long-line blocks#18879

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
chalasr wants to merge1 commit intosymfony:masterfromchalasr:patch_sfstyle_align

Conversation

chalasr
Copy link
Member

@chalasrchalasr commentedMay 25, 2016
edited by javiereguiluz
Loading

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#18564
LicenseMIT
Doc PRn/a

This PR makes all lines aligned in multi-line blocks.

Very-long-line block:

SymfonyStyle::warning('Lorem ipsum...');

Before:
before-1
After:
after-1

Multi-line block:

SymfonyStyle::success(['Lorem ipsum...','Lorem ipsum...','Lorem ipsum...']);

Before:
before-2
After:
after-2

Also@javiereguiluz pointed the case ofSymfonyStyle::comment() in#18564, I needed to make it callingSymfonyStyle::block() with// as prefix to fit the first intention of this one.
So if this one is merged I'll propose the changes for comments in a second PR (out of this scope).

ogizanagi reacted with thumbs up emoji
Remove SymfonyStyle::comment() changes (out of scope)CS FixesAdd tests
@chalasr
Copy link
MemberAuthor

chalasr commentedMay 25, 2016
edited
Loading

My first intention was to propose this on 2.8, it's a mistake...

@javiereguiluzjaviereguiluz added Bug and removed Feature labelsMay 26, 2016
@javiereguiluz
Copy link
Member

@chalasr thanks for this PR. In my opinion this is a bug fix which should be merged in 2.7. The "new" behavior is the one we expected since the beginning.

@fabpot
Copy link
Member

Thank you@chalasr.

fabpot added a commit that referenced this pull requestMay 26, 2016
…ocks (chalasr)This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#18879).Discussion----------[Console] SymfonyStyle: Align multi-line/very-long-line blocks| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18564| License       | MIT| Doc PR        | n/aThis PR makes all lines aligned in multi-line blocks.Very-long-line block:```phpSymfonyStyle::warning('Lorem ipsum...');```Before:![before-1](http://image.prntscr.com/image/d8443d3a85924a0182a62bd6d3dc1086.png)After:![after-1](http://image.prntscr.com/image/dbbdd275bff140bdad06de336f032ec1.png)Multi-line block:```phpSymfonyStyle::success(['Lorem ipsum...', 'Lorem ipsum...', 'Lorem ipsum...']);```Before:![before-2](http://image.prntscr.com/image/6d7c05b4ab3a42f0b0be652527aed7c8.png)After:![after-2](http://image.prntscr.com/image/bba017309f4a4dd09e0147d5917cb0ae.png)Also@javiereguiluz pointed the case of `SymfonyStyle::comment()` in#18564, I needed to make it calling `SymfonyStyle::block()` with ` // ` as prefix to fit the first intention of this one.So if this one is merged I'll propose the changes for comments in a second PR (out of this scope).Commits-------963fe1d [Console] SymfonyStyle: Align multi-line/very-long-line blocks
@fabpotfabpot closed thisMay 26, 2016
@fabpotfabpot mentioned this pull requestMay 26, 2016
@chalasrchalasr deleted the patch_sfstyle_align branchMay 26, 2016 09:23
@chalasr
Copy link
MemberAuthor

@javiereguiluz Do you know if there is a reason for that the 2.7 branch doesn't have theSymfonyStyle::comment() method?
I'll propose the changes for#18564 (comment) and I'm not sure if it should be done on 2.7 or 2.8.

@javiereguiluz
Copy link
Member

@chalasr yes I know the reason well 😁 It was my mistake. At first there wasn't acomment() method and the regular text was displayed commented. Then I realized this was an error and we now havetext() andcomment() methods.

@chalasr
Copy link
MemberAuthor

Hmm ok so I'll keep it on 2.8 (stop me if I'm wrong).
Thank you@javiereguiluz

@@ -57,7 +57,7 @@ public function inputCommandToOutputFilesProvider()

public function testLongWordsBlockWrapping()
{
$word = 'Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As we discussed, this change should not have been necessary for the test to pass. So I suggest to see#18896

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank's for having made the change@ogizanagi

This was referencedJun 6, 2016
fabpot added a commit that referenced this pull requestJun 8, 2016
… to directly test output (ogizanagi)This PR was merged into the 2.7 branch.Discussion----------[Console] [SymfonyStyle] Replace long word wrapping test to directly test output| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18879 (comment)| License       | MIT| Doc PR        | -This [line](https://github.com/symfony/symfony/pull/18879/files#diff-d3625f2548a3b329058ca5a0f5aa57feR60) should not have been changed in order to the test to pass. I assume the test was flawed at first, so I suggest to simply test the output as we did for other ones.Ping@chalasrCommits-------b78fff4 [Console] [SymfonyStyle] Replace long word wrapping test to directly test output
symfony-splitter pushed a commit to symfony/console that referenced this pull requestJun 8, 2016
… to directly test output (ogizanagi)This PR was merged into the 2.7 branch.Discussion----------[Console] [SymfonyStyle] Replace long word wrapping test to directly test output| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |symfony/symfony#18879 (comment)| License       | MIT| Doc PR        | -This [line](https://github.com/symfony/symfony/pull/18879/files#diff-d3625f2548a3b329058ca5a0f5aa57feR60) should not have been changed in order to the test to pass. I assume the test was flawed at first, so I suggest to simply test the output as we did for other ones.Ping@chalasrCommits-------b78fff4 [Console] [SymfonyStyle] Replace long word wrapping test to directly test output
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@chalasr@javiereguiluz@fabpot@ogizanagi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp