Skip to content

3.13.0 - 2025-05-11

Latest
Compare
Choose a tag to compare
@jrfnl jrfnl released this 11 May 04:51
· 24 commits to master since this release
3.13.0
65ff248

Added

  • Added support for PHP 8.4 asymmetric visibility modifiers to the tokenizer. #871
  • Added support for PHP 8.4 final properties to the following sniffs:

Changed

  • Generic.WhiteSpace.LanguageConstructSpacing: will now also check the spacing after the goto language construct keyword. #917
  • The PSR2.Classes.PropertyDeclaration will now check that the final modifier keyword is placed before a visibility keyword. #950
  • Improved Help information about the --reports CLI flag. #1078
  • The documentation for the following sniffs has been improved:
    • PSR1.Files.SideEffects
    • PSR2.ControlStructures.SwitchDeclaration
    • PSR2.Namespaces.NamespaceDeclaration
    • Thanks to Rodrigo Primo for the patches.
  • Various housekeeping, including improvements to the tests and documentation.

Deprecated

  • Nearly everything which was soft deprecated before is now hard deprecated and will show deprecation notices:
    • This applies to:
      • All sniffs which will be removed in 4.0. #888
      • The deprecated Generator methods. #889
      • The old array property setting format (via comma separated strings). #890
      • Sniffs not implementing the PHP_CodeSniffer\Sniffs\Sniff interface. #891
      • Sniffs not following the naming conventions. #892
      • Standards called Internal. #893
      • Sniffs which don't listen for PHP, like JS/CSS specific sniffs. #894
    • The deprecation notices can be silenced by using the -q (=quiet) CLI flag.
    • Thanks to Juliette Reinders Folmer for the patches.

Fixed

  • Fixed bug #1040 : Generic.Strings.UnnecessaryHeredoc - false positive for heredocs containing escape sequences.
  • Fixed bug #1040 : Generic.Strings.UnnecessaryHeredoc - fixer would not clean up escape sequences which aren't necessary in nowdocs.
  • Fixed bug #1048 : A file under scan would sometimes be updated with partial fixes, even though the file "failed to fix".

Other

Calling all testers!

The first beta release for PHP_CodeSniffer 4.0 has been tagged. Please help by testing the beta release and reporting any issues you run into.
Upgrade guides for both ruleset maintainers/end-users, as well as for sniff developers and integrators, have been published to the Wiki to help smooth the transition.


Statistics

Closed: 3 issues
Merged: 29 pull requests

Follow @phpcs on Mastodon or @PHP_CodeSniffer on X to stay informed.

Please consider funding the PHP_CodeSniffer project. If you already do so: thank you!