Repository navigation
feat: sort imports alphabetically and shorten names resolvable by imports - #14
Merged
Merged
Conversation
…orts The rules were proposed for roadrunner-php/version-checker#11 and belong to the shared preset. `fully_qualified_strict_types` keeps the leading backslash in the global namespace so configs like `.php-cs-fixer.dist.php` stay as they are. Co-authored-by: Владислав Новиков <v.novikov@qsoft.ru> Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What was changed
usestatements are now sorted alphabetically within the class / function / const groups (ordered_imports);@PER-CS2x0only groups them and keeps the written order.fully_qualified_strict_types: a fully qualified name is shortened when it is already imported or belongs to the current namespace, in code and in simple PHPDoc tags. The leading backslash in the global namespace is kept, so configs like.php-cs-fixer.dist.php(\Spiral\CodeStyle\Builder::create()) are not touched.cs:fixrun; onroadrunner-php/workerit is a single swapped import.Why?
The rules were proposed as local overrides in roadrunner-php/version-checker#11 and belong in the shared preset.
Checklist
roadrunner-php/workerandroadrunner-php/version-checkersources