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

PSR12/FileHeader: bug fix - false positives on PHP 8.2+ readonly classes #3816

Closed jrfnl closed 1 year ago

jrfnl commented 1 year ago

As reported in https://github.com/squizlabs/PHP_CodeSniffer/issues/3799#issuecomment-1532870980, the FileHeader sniff did not take the new PHP 8.2+ readonly OO modifier keyword into account.

Fixed now.

Includes test.

martinjoiner commented 1 year ago

I would love to see this PR merged. Can I can offer any support @jrfnl ?

jrfnl commented 1 year ago

@martinjoiner It's on the list of priority PRs we are working our way through. For now, please be patient as there is a lot of backlog to work through. Also see https://github.com/squizlabs/PHP_CodeSniffer/issues/3814

jrfnl commented 1 year ago

@martinjoiner Oh and testing PRs to verify they work as you expect them to and leaving a comment with your test finding is always helpful. You can test PRs either by checking out the PR branch or by downloading the PHAR file for the PR created by the test workflows in GH Actions.

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

martinjoiner commented 9 months ago

A sterling effort! I hope one day to contribute more to the project in its new location.