fix: OrderedImportsFixer - do not take the braces part in grouped imports into account#8459
Merged
keradus merged 5 commits intoPHP-CS-Fixer:masterfrom Mar 27, 2025
Conversation
keradus
reviewed
Mar 3, 2025
Comment on lines
+1984
to
+1990
| yield 'do not take the braces part in grouped imports into account' => [ | ||
| <<<'PHP' | ||
| <?php | ||
| use Foo\{Bar, Baz}; | ||
| use Foo\NotBarNorBar\DeeperClass; | ||
| PHP, | ||
| ]; |
Member
There was a problem hiding this comment.
Suggested change
| yield 'do not take the braces part in grouped imports into account' => [ | |
| <<<'PHP' | |
| <?php | |
| use Foo\{Bar, Baz}; | |
| use Foo\NotBarNorBar\DeeperClass; | |
| PHP, | |
| ]; | |
| yield 'do not take the braces part in grouped imports into account - case A' => [ | |
| <<<'PHP' | |
| <?php | |
| use Foo\{Bar, Baz}; | |
| use Foo\NotBarNorBar\DeeperClass; | |
| PHP, | |
| ]; | |
| yield 'do not take the braces part in grouped imports into account - case B' => [ | |
| <<<'PHP' | |
| <?php | |
| use Foo\NotBarNorBar\DeeperClass; | |
| use Foo\{Xxx, Yyy}; | |
| PHP, | |
| <<<'PHP' | |
| <?php | |
| use Foo\{Xxx, Yyy}; | |
| use Foo\NotBarNorBar\DeeperClass; | |
| PHP, | |
| ]; |
Member
Author
There was a problem hiding this comment.
Let's just have one, but more complicated test case, names case A/case B do not help to understand what is the difference between them.
keradus
reviewed
Mar 3, 2025
Member
keradus
left a comment
There was a problem hiding this comment.
thanks for working on it
if my test case would be accepted and CI still green, 👍🏻 for merge
keradus
approved these changes
Mar 27, 2025
This was referenced Apr 1, 2025
samsonasik
pushed a commit
to easy-coding-standard/easy-coding-standard
that referenced
this pull request
Apr 1, 2025
Ref PHP-CS-Fixer/PHP-CS-Fixer#8459 First appeared in v3.74.0 Bump Composer to require v3.75.0
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #5347