PHP Code Sniffer v3.3.2 Release Notes

Release Date: 2018-09-23 // over 5 years ago
    • ๐Ÿ›  Fixed a problem where the report cache was not being cleared when the sniffs inside a standard were updated
    • The info report (--report=info) now has improved formatting for metrics that span multiple lines
      • Thanks to Juliette Reinders Folmer for the patch
    • โœ… The unit test runner now skips .bak files when looking for test cases
      • Thanks to Juliette Reinders Folmer for the patch
    • The Squiz standard now ensures underscores are not used to indicate visibility of private members vars and methods
      • Previously, this standard enforced the use of underscores
    • Generic.PHP.NoSilencedErrors error messages now contain a code snippet to show the context of the error
      • Thanks to Juliette Reinders Folmer for the patch
    • Squiz.Arrays.ArrayDeclaration no longer reports errors for a comma on a line new after a here/nowdoc
      • Also stops a parse error being generated when auto-fixing
      • The SpaceBeforeComma error message has been changed to only have one data value instead of two
    • Squiz.Commenting.FunctionComment no longer errors when trying to fix indents of multi-line param comments
    • ๐Ÿ›  Squiz.Formatting.OperatorBracket now correctly fixes statements that contain strings
    • ๐Ÿ’… Squiz.PHP.CommentedOutCode now ignores more @-style annotations and includes better comment block detection
      • Thanks to Juliette Reinders Folmer for the patch
    • ๐Ÿ›  Fixed a problem where referencing a relative file path in a ruleset XML file could add unnecessary sniff exclusions
      • This didn't actually exclude anything, but caused verbose output to list strange exclusion rules
    • ๐Ÿ›  Fixed bug #2110 : Squiz.WhiteSpace.FunctionSpacing is removing indents from the start of functions when fixing
      • Thanks to Juliette Reinders Folmer for the patch
    • ๐Ÿ›  Fixed bug #2115 : Squiz.Commenting.VariableComment not checking var types when the @var line contains a comment
    • Fixed bug #2120 : Tokenizer fails to match T_INLINE_ELSE when used after function call containing closure
    • ๐Ÿ›  Fixed bug #2121 : Squiz.PHP.DisallowMultipleAssignments false positive in while loop conditions
      • Thanks to Juliette Reinders Folmer for the patch
    • ๐Ÿ›  Fixed bug #2127 : File::findExtendedClassName() doesn't support nested classes
      • Thanks to Juliette Reinders Folmer for the patch
    • ๐Ÿ›  Fixed bug #2138 : Tokenizer detects wrong token for php ::class feature with spaces
    • ๐Ÿ›  Fixed bug #2143 : PSR2.Namespaces.UseDeclaration does not properly fix "use function" and "use const" statements
      • Thanks to Chris Wilkinson for the patch
    • ๐Ÿ›  Fixed bug #2144 : Squiz.Arrays.ArrayDeclaration does incorrect align calculation in array with cyrillic keys
    • ๐Ÿ›  Fixed bug #2146 : Zend.Files.ClosingTag removes closing tag from end of file without inserting a semicolon
    • ๐Ÿ›  Fixed bug #2151 : XML schema not updated with the new array property syntax