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

[CodeQuality] Skip dynamic second arg or has uppercase second arg on SimplifyStrposLowerRector #5855

Merged
merged 3 commits into from
May 2, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik
Copy link
Member Author

@kkmuffme this should fix rectorphp/rector#8618

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit d8f262a into main May 2, 2024
42 checks passed
@samsonasik samsonasik deleted the skip-dynamic-upp branch May 2, 2024 09:04
@kkmuffme
Copy link
Contributor

kkmuffme commented May 2, 2024

@samsonasik thanks, but I'm not sure that's a good fix.
https://getrector.com/demo/27617834-bf9d-4730-881d-af84e759161b is only lowercase, so this should be changed according to what you said?

Also what if the uppercase letters are non-latin A-Z, e.g. cyrillic then this fix still has the same bug as before I guess?

@samsonasik
Copy link
Member Author

direct string is safer for this, if you mean non-latin got unicode, that still correct, as strtolower only transform non-unicode to lower, so comparison will still correct.

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