PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

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

Open jrfnl opened this issue 3 years ago • 1 comments

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:

  • https://wiki.php.net/rfc/readonly_classes

jrfnl avatar Oct 06 '22 21:10 jrfnl

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

jrfnl avatar Oct 06 '22 23:10 jrfnl

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).

jrfnl avatar Dec 08 '23 23:12 jrfnl