This repository was archived by the owner on Jan 8, 2020. It is now read-only.
Prettify the output of Zend\Code\Generator\ValueGenerator for multi line arrays#5616
Merged
weierophinney merged 3 commits intoMar 4, 2014
Merged
Prettify the output of Zend\Code\Generator\ValueGenerator for multi line arrays#5616weierophinney merged 3 commits into
weierophinney merged 3 commits into
Conversation
Contributor
|
@RalfEggert Update the unit tests please, there are some fails https://travis-ci.org/zendframework/zf2/jobs/15495156#L281 |
Contributor
Author
|
Sorry, forgot about that. The unit tests are fixed now... |
Contributor
Contributor
Author
|
To be honest, I don't really understand what failed there... :-( |
Contributor
|
@RalfEggert the closing parenthesis of the expected value is indended 4 spaces to much. https://github.com/RalfEggert/zf2/blob/0413da7532bc8e28e18527af18ac1ad9875cfb90/tests/ZendTest/Code/Generator/PropertyGeneratorTest.php#L108 |
Contributor
Author
|
@Netiul Thanks, I just checked the ValueGeneratorTest and missed that one. Now it should work... |
Contributor
Member
There was a problem hiding this comment.
In this case the close parenthesis should not be indented
weierophinney
added a commit
that referenced
this pull request
Mar 4, 2014
…tify Prettify the output of Zend\Code\Generator\ValueGenerator for multi line arrays
weierophinney
added a commit
that referenced
this pull request
Mar 4, 2014
weierophinney
added a commit
that referenced
this pull request
Mar 5, 2014
[#5616] Adapt array indentation to PSR-2 guidelines by default
weierophinney
added a commit
that referenced
this pull request
Mar 5, 2014
Based on new tests and links to relevant specifications, the code from #5608 was invalid; header lines may never start with whitespace. This patch reverts that code, and updates the `fromString()` logic to capture whitespace on subsequent lines to include in the multi-line header value. Tests have been updated where necessary to use a regex for testing the existence of whitespace between multiline values.
weierophinney
added a commit
that referenced
this pull request
Mar 5, 2014
weierophinney
added a commit
that referenced
this pull request
Mar 5, 2014
Forward port #5616 Conflicts: tests/ZendTest/Http/Response/ResponseStreamTest.php tests/ZendTest/Http/ResponseTest.php
weierophinney
added a commit
to zendframework/zend-http
that referenced
this pull request
May 15, 2015
…dframework#5608 Based on new tests and links to relevant specifications, the code from zendframework/zendframework#5608 was invalid; header lines may never start with whitespace. This patch reverts that code, and updates the `fromString()` logic to capture whitespace on subsequent lines to include in the multi-line header value. Tests have been updated where necessary to use a regex for testing the existence of whitespace between multiline values.
weierophinney
added a commit
to zendframework/zend-http
that referenced
this pull request
May 15, 2015
weierophinney
added a commit
to zendframework/zend-http
that referenced
this pull request
May 15, 2015
Forward port zendframework/zendframework#5616 Conflicts: tests/ZendTest/Http/Response/ResponseStreamTest.php tests/ZendTest/Http/ResponseTest.php
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix prettifies the output for multi line arrays generated with
Zend\Code\Generator\ValueGeneratorWithout this fix, an array looks like this.
With the fix, the same array will look like this:
Please note the changes for the entry for 'view_manager' and the positions of the braces.