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

fix: Handle FQCN properly with leading_backslash_in_global_namespace option enabled #7654

Merged

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Jan 1, 2024

@mvorisek
Copy link
Contributor Author

mvorisek commented Jan 3, 2024

@Wirone would you find a moment for review this PR as well - I need it to finish other PRs :)

Copy link
Member

@Wirone Wirone left a comment

Choose a reason for hiding this comment

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

As far as I understand the changes, the leading_backslash_in_global_namespace option was preventing fixer from removing leading \, but it was not ensuring it's added when missing? Looks good in general, one minor improvement requested.

src/Fixer/Import/FullyQualifiedStrictTypesFixer.php Outdated Show resolved Hide resolved
@Wirone Wirone added the topic/fqcn Fully Qualified Class Name usage and conversions label Jan 3, 2024
@mvorisek mvorisek requested a review from Wirone January 3, 2024 16:06
@Wirone Wirone changed the title fix: FQCN /w leading_backslash_in_global_namespace option fix: Handle FQCN properly with leading_backslash_in_global_namespace option enabled Jan 3, 2024
@Wirone Wirone force-pushed the fqcn_global_rm_leading_backslash branch from ade30d8 to ff823bd Compare January 3, 2024 16:27
@Wirone Wirone enabled auto-merge (squash) January 3, 2024 16:27
@Wirone Wirone merged commit 0061223 into PHP-CS-Fixer:master Jan 3, 2024
25 checks passed
@mvorisek mvorisek deleted the fqcn_global_rm_leading_backslash branch January 3, 2024 16:38
danog pushed a commit to zoonru/PHP-CS-Fixer that referenced this pull request Feb 2, 2024
…` option enabled (PHP-CS-Fixer#7654)

Co-authored-by: Greg Korba <greg@codito.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/fqcn Fully Qualified Class Name usage and conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants