-
Notifications
You must be signed in to change notification settings - Fork 56
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
Raise Squiz.PHP.NonExecutableCode to error #204
base: 8.2.x
Are you sure you want to change the base?
Conversation
Are you saying that the intent is wrong? If yes, why not report that upstream instead? |
No no... I think the intent of Not sure if doctrine org intentions was to have it as a warning or if you just missed that.. If this rule is added to doctrine standard as a warning on purpose then we can close this.. |
I don't know if this was intended to be a warning, but I like to have an error here for NonExecutableCode. It had a few false positives in the past and maybe that's why it's a warning, but if this isn't an issue anymore, then an error would be fine. |
Not sure about the target branch… is this really a bugfix? |
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.
IMO requires major anyway, still LGTM
Maybe we should consider removing the rule completely. It produces false positives for throw expressions in PHP 8 and PHPStan/Psalm should have a better dead code detection. |
Works too 👍 |
FYI: The above mentioned issues have been fixed and the fixes will be included in PHPCS 3.8.0. |
Not sure if this was on purpose.
This rules is intent to throw a warning and not an error.