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

rearranges use statements even if file not touched #22

Open
matthbull opened this issue Jan 14, 2016 · 5 comments
Open

rearranges use statements even if file not touched #22

matthbull opened this issue Jan 14, 2016 · 5 comments

Comments

@matthbull
Copy link

its not a major thing, but it messes with VCS tracking quite a bit.

On files where no changes are made, the tool (which is excellent btw) changes the order of the use statements at the top of the file. This makes it look like you've touched the file from a VCS point of view which aggravates touchy tech-leads.

@umpirsky
Copy link
Owner

@matthbull Thanks for the feedback.

This is caused by 180d267, I added it to fix #13.

Until it's fixed you have 2 possible workarounds:

  • Run php-cs-fixer fix --fixers=ordered_use on your code, then commit, then run upgrade fixer.

or

@althaus
Copy link

althaus commented May 3, 2016

Isn't it possible to check, if anything else is to fix, before running the OrderedUseFixer?

@umpirsky
Copy link
Owner

umpirsky commented May 6, 2016

Yes, but that would require quite some changes.

@romaricdrigon
Copy link
Contributor

+1, this is actually annoying. No way to make this configurable at runtime?
As with PHP CS Fixer, some rules can be excluded.

@romaricdrigon
Copy link
Contributor

Done, I sent such a PR :)
In our case, from 130 modified files we go to only 30. This is a big step for readibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants