Closed ZebulanStanphill closed 1 year ago
related: #2857
FYI: the fix for this issue is included in today's PHP_CodeSniffer 3.8.0 release.
As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo).
Describe the bug The throw expression added in PHP 8 is not supported by the
Squiz.PHP.NonExecutableCode
rule.Code sample
Custom ruleset
To reproduce Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
Expected behavior Throw expressions should be recognized as expressions, not statements.
Versions (please complete the following information):