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

GroupImportFixer - fix breaking code when fixing root classes #5598

Merged
merged 1 commit into from
Apr 6, 2021

Conversation

Leprechaunz
Copy link
Contributor

@Leprechaunz Leprechaunz commented Apr 5, 2021

Fixes #5574

@kubawerlos
Copy link
Contributor

@Leprechaunz you don't want to add that test in integration tests, but in GroupImportFixerTest.

@coveralls
Copy link

coveralls commented Apr 5, 2021

Coverage Status

Coverage increased (+0.001%) to 91.848% when pulling 486b598 on Leprechaunz:fix-group-import into 02675fc on FriendsOfPHP:2.18.

src/Fixer/Import/GroupImportFixer.php Outdated Show resolved Hide resolved
use Foo\Bar;
use Foo\Baz;
use ReflectionClass;
use ReflectionMethod;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add one more test when all imported classes have leading \.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, thanks

@kubawerlos kubawerlos added this to the 2.18.5 milestone Apr 6, 2021
@keradus keradus changed the title "group_import" breaks code when fixing root classes #5574 GroupImportFixer - fix breaking code when fixing root classes Apr 6, 2021
@keradus
Copy link
Member

keradus commented Apr 6, 2021

Thanks for fixing this bug @Leprechaunz.

@keradus keradus merged commit 0d87d97 into PHP-CS-Fixer:2.18 Apr 6, 2021
@weshooper
Copy link
Contributor

Thanks @Leprechaunz 😍

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

Successfully merging this pull request may close these issues.

group_import breaks code when fixing root classes
5 participants