Raise Squiz.PHP.NonExecutableCode to error#204
Raise Squiz.PHP.NonExecutableCode to error#204gmponos wants to merge 1 commit intodoctrine:8.2.xfrom
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? |
Ocramius
left a comment
There was a problem hiding this comment.
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.