github PHPCSStandards/PHP_CodeSniffer 3.11.2
3.11.2 - 2024-12-11

9 days ago

Changed

  • Generators/HTML + Markdown: the output will now be empty (no page header/footer) when there are no docs to display. #687
    • This is in line with the Text Generator which already didn't produce output if there are no docs.
    • Thanks to Juliette Reinders Folmer for the patch.
  • Generators/HTML: only display a Table of Contents when there is more than one sniff with documentation. #697
  • Generators/HTML: improved handling of line breaks in <standard> blocks. #723
  • Generators/Markdown: improved compatibility with the variety of available markdown parsers. #722
  • Generators/Markdown: improved handling of line breaks in <standard> blocks. #737
    • This prevents additional paragraphs from being displayed as code blocks.
    • Thanks to Juliette Reinders Folmer for the patch.
  • Generic.NamingConventions.UpperCaseConstantName: the exact token containing the non-uppercase constant name will now be identified with more accuracy. #665
  • Generic.Functions.OpeningFunctionBraceKernighanRitchie: minor improvement to the error message wording. #736
  • Various housekeeping, including improvements to the tests and documentation.

Fixed

  • Fixed bug #527 : Squiz.Arrays.ArrayDeclaration: short lists within a foreach condition should be ignored.
  • Fixed bug #665 : Generic.NamingConventions.UpperCaseConstantName: false positives and false negatives when code uses unconventional spacing and comments when calling define().
  • Fixed bug #665 : Generic.NamingConventions.UpperCaseConstantName: false positive when a constant named DEFINE is encountered.
  • Fixed bug #665 : Generic.NamingConventions.UpperCaseConstantName: false positive for attribute class called define.
  • Fixed bug #665 : Generic.NamingConventions.UpperCaseConstantName: false positive when handling the instantiation of a class named define.
  • Fixed bug #688 : Generators/Markdown could leave error_reporting in an incorrect state.
  • Fixed bug #698 : Generators/Markdown : link in the documentation footer would not parse as a link.
  • Fixed bug #738 : Generators/Text: stray blank lines after code sample titles.
  • Fixed bug #739 : Generators/HTML + Markdown: multi-space whitespace within a code sample title was folded into a single space.

Other

  • On December 1st, one year after the repo was abandoned and revived, a retrospective of the past year was published for funders.
    • This retrospective is publicly available and also provides some insights into what's to come in the new year.

Statistics

Closed: 2 issues
Merged: 52 pull requests

If you like to stay informed about releases and more, follow @phpcs on Mastodon or @PHP_CodeSniffer on X.

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

Don't miss a new PHP_CodeSniffer release

NewReleases is sending notifications on new releases.