squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.66k stars 1.48k forks source link

PHP 8.2 | File::getClassProperties(): add support for readonly classes #3686

Closed jrfnl closed 1 year ago

jrfnl commented 1 year ago

PHP 8.2 introduces readonly classes. The readonly keyword can be combined with the abstract or final keyword. See: https://3v4l.org/VIXgD

Includes adding a full set of tests for the File::getClassProperties() method, which was so far untested.

Ref:

jrfnl commented 1 year ago

FYI: I have follow-up commits ready for 11 sniffs to take readonly classes into account.

jrfnl commented 9 months ago

FYI: this fix 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).