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: FullyQualifiedStrictTypesFixer - do not change case of the symbol when there's name collision between imported class and imported function #7750

Conversation

kubawerlos
Copy link
Contributor

Fixes #7744

@coveralls
Copy link

Coverage Status

coverage: 94.764% (+0.001%) from 94.763%
when pulling 88f43f4 on 6b7562617765726c6f73:fix_FullyQualifiedStrictTypesFixer
into e3afa32 on PHP-CS-Fixer:master.

@Wirone Wirone changed the title fix: FullyQualifiedStrictTypesFixer - do not change case of the class when there's name collision between imported class and imported function fix: FullyQualifiedStrictTypesFixer - do not change case of the symbol when there's name collision between imported class and imported function Jan 16, 2024
@Wirone Wirone added the topic/fqcn Fully Qualified Class Name usage and conversions label Jan 16, 2024
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.

It's a great quick fix ❤️. Currently the fixer handles only places in the code where class-like symbols are used, so basically we don't need imported functions. Later, in #7704 or #7705 we will provide proper support for import kinds.

@Wirone Wirone merged commit bf48c81 into PHP-CS-Fixer:master Jan 16, 2024
25 checks passed
@Wirone
Copy link
Member

Wirone commented Jan 16, 2024

Thank you very much @kubawerlos 🍻!

@kubawerlos kubawerlos deleted the fix_FullyQualifiedStrictTypesFixer branch January 16, 2024 09:53
@MidnightDesign
Copy link

@Wirone Is this planned to be released soon? Since PHP CS Fixer doesn't have a way to suppress issues inline (I just found one that was closed as "not planned"), this is breaking our application in CI.

@Wirone
Copy link
Member

Wirone commented Jan 16, 2024

@MidnightDesign unfortunately I can't make release myself and we're waiting for #7752 (or #7719). I believe @keradus will release patch today, but can't tell when exactly. When it comes to CI, I believe you shouldn't allow latest version blindly, but instead you should control which version of the tool is installed (so you can freeze version if there is any problem with new release) 🙂.

danog pushed a commit to zoonru/PHP-CS-Fixer that referenced this pull request Feb 2, 2024
…bol when there's name collision between imported class and imported function (PHP-CS-Fixer#7750)
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.

Symbols' casing is changed when there's name collision between imported class and imported function
4 participants