Skip to content
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

LineEndingFixer - BracesFixer - Priority #4245

Merged

Conversation

dmvdbrugge
Copy link
Contributor

Separated the line_ending/braces-priority relation and some comments from #4085

@SpacePossum
Copy link
Contributor

SpacePossum commented Jan 10, 2019

Thanks for all the profiling on priorities!
I didn't catch up on all the bigger PR's and comments, however I wander; can't this conflict be avoided if the braces uses the line ending that line_ending enforces, or maybe be more eol style-agnostic ? Just curious :)

--edit: bunch of typos and wording

@dmvdbrugge
Copy link
Contributor Author

I just checked, braces never inserts hardcoded newlines, they come from the whitespace config. It does do some string-magic with \ns though, however at the moment I wouldn't know how to actually fix that (without spending hours for deeply understanding braces).

keradus added a commit that referenced this pull request Feb 3, 2019
… priority issue (dmvdbrugge)

This PR was merged into the 2.12 branch.

Discussion
----------

MethodChainingIndentationFixer, ArrayIndentationFixer - Fix priority issue

Fixes #4271.

Pre-2.12.5 `MethodChainingIndentationFixer` had no priority, I introduced it in #4084. It now needs to be upped because it needs to keep running before `ArrayIndentationFixer`.

Lowering `ArrayIndentationFixer` was not an option as it already has multiple fixers running after it (which are in the `FixerFactoryTest`, but not in its comments, however the comments are already being fixed in #4245).

Commits
-------

a6bd13c MethodChainingIndentationFixer should run before ArrayIndentationFixer
@SpacePossum SpacePossum added RTM Ready To Merge topic/tests labels Apr 4, 2019
@SpacePossum SpacePossum added this to the 2.12.9 milestone Apr 4, 2019
@SpacePossum
Copy link
Contributor

note to self, 7.3 failures are not related to this PR

@SpacePossum
Copy link
Contributor

Thank you @dmvdbrugge.

@SpacePossum SpacePossum removed the RTM Ready To Merge label Apr 5, 2019
@SpacePossum SpacePossum merged commit 33f5fcd into PHP-CS-Fixer:2.12 Apr 5, 2019
SpacePossum added a commit that referenced this pull request Apr 5, 2019
This PR was merged into the 2.12 branch.

Discussion
----------

LineEndingFixer - BracesFixer - Priority

Separated the `line_ending`/`braces`-priority relation and some comments from #4085

Commits
-------

33f5fcd Define priority between LineEndingFixer and BracesFixer
@dmvdbrugge dmvdbrugge deleted the line_ending_before_braces branch May 12, 2019 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants