-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feature: BlankLineBetweenImportGroupsFixer - Introduction #6365
feature: BlankLineBetweenImportGroupsFixer - Introduction #6365
Conversation
tests/Fixer/Whitespace/BlankLineBetweenImportGroupsFixerTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Just a few nitpicks and this can be merged IMO.
@SpacePossum and/or @keradus, sorry for the ping. This is my first pull request to contribute to the amazing PHP CS Fixer, and I was wondering what further needs to be done to get this approved and being used upstream? |
The PR already looks great, I left a little review PR on your fork to deal some edge cases where the fixer would break the code, let me know what you think. |
Hi @SanderVerkuil. Some tests are failing, can you please fix them? Then we can merge :) |
Hmn, @SpacePossum added some tests where comments have been added within the use import statement, like: use Weird\Be/**comment*/hat; Which is apparently correct php in some cases, but not all. The errors are regarding PHP syntax errors, and used to run fine on PHP 7 if I recall correctly, but apparently break on PHP 8.1. Should I just remove those test cases (as the error is that it's a PHP syntax error), or only test these cases in PHP 7? |
Not sure this test has much value if it is only valid on a PHP version that we'll likely stop supporting soon anyway. I would remove it. What do you think @SpacePossum? |
The failure on 7.4 are a priority test/fixture issue in here: So lets see what is up with that. Than lets move the
, as I don't know what the planning is for dropping 7.4 support but my guess is it might be for a while |
please consider: SanderVerkuil#2 |
@SpacePossum Will do that as soon as I'm home tomorrow 💪. Thanks for your help and support! Now only another approval for the tests and I'll happily squash all commits |
In combination with the grouped use statements, PHP-CS-Fixer fully supports the PSR12 guidelines for the use statements.
42d83bb
to
36c2d6b
Compare
@SpacePossum The commits have been rebased and squashed, and is now a single commit. Thanks for all the help, let's hope this will be merged soon 🤞 |
Thanks! : D Hope it will ship soon as well :) |
Thank you @SanderVerkuil. |
Closes #4821
I've also updated the PSR12 set to include this rule, to be compliant with the PSR12.