-
-
Notifications
You must be signed in to change notification settings - Fork 149
Fix inconsistent switch case syntax #264
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
Conversation
This must have been a typo, since it's the only instance where the non-standard syntax is used.
Hey, thanks @theodorejb for taking the time to file this PR. There are two things that bother me with this:
|
@WyriHaximus I ran a script across the top Composer packages to find any that were using the alternate switch case syntax, since I'm considering writing an RFC to deprecate it. In the top 1000 packages, this was one of only two where I found it used. All usages appeared to be typos (randomly mixed in with case statements using the standard syntax). PHP-CS-Fixer will automatically find/fix these issues when using the |
@theodorejb Ahh cool thanks, and tbh been doing PHP for 20+ years and only learned today this is valid syntax 🤦 . And honestly that RFC makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theodorejb TIL! Thanks for looking into this and best of luck with that RFC 👍
(I've marked this as maintenance to emphasize this shouldn't otherwise affect how this code functions.)
Could this fix please be released with due haste ? The PHP 8.5 deprecation has been merged into PHP core and the nightly build for This effectively means that the deprecation notice for the code in the 3.2.0 version is currently causing |
This must have been a typo, since it's the only instance where the non-standard syntax is used.