chore(deps): update dependency squizlabs/php_codesniffer to v3.13.1 - autoclosed #13

Closed
renovate-bot wants to merge 1 commit from renovate/squizlabs-php_codesniffer-3.x-lockfile into master
Collaborator

This PR contains the following updates:

Package Type Update Change
squizlabs/php_codesniffer require-dev minor 3.11.2 -> 3.13.1

⚠️ Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

PHPCSStandards/PHP_CodeSniffer (squizlabs/php_codesniffer)

v3.13.1

Compare Source

Added
  • Added support for PHP 8.4 properties with asymmetric visibility to File::getMemberProperties() through a new set_scope array index in the return value. #​1116
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patches.
  • Added support for PHP 8.4 (constructor promoted) properties with asymmetric visibility to File::getMethodParameters() through new set_visibility and set_visibility_token array indexes in the return value. #​1116
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patches.
  • Added support for PHP 8.4 asymmetric visibility modifiers to the following sniffs:
    • Generic.PHP.LowerCaseKeyword #​1117
    • PEAR.NamingConventions.ValidVariableName #​1118
    • PSR2.Classes.PropertyDeclaration #​1119
    • Squiz.Commenting.BlockComment #​1120
    • Squiz.Commenting.DocCommentAlignment #​1120
    • Squiz.Commenting.VariableComment #​1120
    • Squiz.Functions.FunctionDeclarationArgumentSpacing #​1121
    • Squiz.Scope.MemberVarScope #​1122
    • Squiz.WhiteSpace.MemberVarSpacing #​1123
    • Squiz.WhiteSpace.ScopeKeywordSpacing #​1124
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patches.
Changed
  • The PSR2.Classes.PropertyDeclaration will now check that a set-visibility modifier keyword is placed after a potential general visibility keyword. #​1119
    • Errors will be reported via a new AvizKeywordOrder error code.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The Squiz.Functions.FunctionDeclarationArgumentSpacing will now check spacing after a set-visibility modifier keyword. #​1121
    • Errors will be reported via a new SpacingAfterSetVisibility error code.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The Squiz.Scope.MemberVarScope will now flag missing "read" visibility, when "write" visibility is set, under a separate error code AsymReadMissing. #​1122
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The documentation for the following sniffs has been improved:
    • PEAR.Classes.ClassDeclaration
    • Squiz.WhiteSpace.FunctionOpeningBraceSpace
    • Thanks to [Brian Dunne][@​braindawg] and [Rodrigo Primo][@​rodrigoprimo] for the patches.
  • Various housekeeping, including improvements to the tests and documentation.
Other
  • The latest PHP_CodeSniffer XSD file is now available via the following permalink: https://schema.phpcodesniffer.com/phpcs.xsd. #​1094
    Older XSD files can be referenced via permalinks based on their minor: https://schema.phpcodesniffer.com/#.#/phpcs.xsd.
  • The GPG signature for the PHAR files has been rotated. The new fingerprint is: D91D869.

v3.13.0

Compare Source

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:
    • PSR2.Classes.PropertyDeclaration #​950
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patches.
Changed
  • Generic.WhiteSpace.LanguageConstructSpacing: will now also check the spacing after the goto language construct keyword. #​917
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The PSR2.Classes.PropertyDeclaration will now check that the final modifier keyword is placed before a visibility keyword. #​950
    • Errors will be reported via a new FinalAfterVisibility error code.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Improved Help information about the --reports CLI flag. #​1078
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The documentation for the following sniffs has been improved:
    • PSR1.Files.SideEffects
    • PSR2.ControlStructures.SwitchDeclaration
    • PSR2.Namespaces.NamespaceDeclaration
    • Thanks to [Rodrigo Primo][@​rodrigoprimo] for the patches.
  • Various housekeeping, including improvements to the tests and documentation.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for their contributions.
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][@​jrfnl] for the patches.
Fixed
  • Fixed bug #​1040 : Generic.Strings.UnnecessaryHeredoc - false positive for heredocs containing escape sequences.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​1040 : Generic.Strings.UnnecessaryHeredoc - fixer would not clean up escape sequences which aren't necessary in nowdocs.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​1048 : A file under scan would sometimes be updated with partial fixes, even though the file "failed to fix".
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
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.

v3.12.2

Compare Source

Added
  • Added support for PHP 8.4 final properties to the following sniffs:
    • Generic.PHP.LowerCaseConstant #​948
    • Generic.PHP.UpperCaseConstant #​948
    • Squiz.Commenting.DocCommentAlignment #​951
    • Squiz.Commenting.VariableComment #​949
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patches.
Changed
  • Tokenizer/PHP: a PHP open tag at the very end of a file will now always be tokenized as T_OPEN_TAG, independently of the PHP version. #​937
    • Previously, a PHP open tag at the end of a file was not tokenized as an open tag on PHP < 7.4 and the tokenization would depend on the short_open_tag setting.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • PEAR.Commenting.FunctionComment: improved message for "blank lines between docblock and declaration" check. #​830
  • The documentation for the following sniffs has been improved:
    • Generic.Functions.OpeningFunctionBraceBsdAllman
    • Generic.Functions.OpeningFunctionBraceKernighanRitchie
    • Generic.WhiteSpace.LanguageConstructSpacing
    • Thanks to [Rodrigo Primo][@​rodrigoprimo] for the patches.
  • Various housekeeping, including improvements to the tests and documentation.
Fixed
  • Fixed bug #​830 : PEAR.Commenting.FunctionComment will no longer remove blank lines within attributes.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​929 : Generic.PHP.ForbiddenFunctions: prevent false positives/negatives for code interlaced with comments.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​934 : Generic.PHP.LowerCaseConstant and Generic.PHP.UpperCaseConstant will now correctly ignore DNF types for properties.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​936 : Squiz.Commenting.FunctionCommentThrowTag: sniff would bow out when function has attributes attached, leading to false negatives.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​940 : Squiz.Commenting.VariableComment: false positive for missing docblock for properties using DNF types.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​944 : Squiz.Commenting.FunctionComment did not support DNF/intersection types in @param tags.
    • Thanks to [Jeffrey Angenent][@​devfrey] for the patch.
  • Fixed bug #​945 : Squiz.WhiteSpace.FunctionSpacing would get confused when there are two docblocks above a function declaration.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​947 : Squiz.Commenting.FunctionCommentThrowTag: prevent false positives/negatives for code interlaced with comments.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​951 : Squiz.Commenting.DocCommentAlignment did not examine docblocks for final classes.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​955 : Potential race condition, leading to a fatal error, when both the Diff + the Code reports are requested and caching is on.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​956 : Generic.WhiteSpace.ScopeIndent: undefined array index notice when running in debug mode.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.

v3.12.1

Compare Source

Added
  • Documentation for the following sniffs:
    • Squiz.Commenting.BlockComment
    • Thanks to [Colin Stewart][@​costdev] for the patch.
Changed
  • Generic.WhiteSpace.HereNowdocIdentifierSpacing: improved error message text.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Various housekeeping, including improvements to the tests and documentation.
Deprecated
  • The Generic.Functions.CallTimePassByReference sniff. See #​921.
    • This sniff will be removed in version 4.0.0.
Fixed
  • Fixed bug #​906 : Fixer: prevent InvalidArgumentExceptions when displaying verbose information.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​907 : Tokenizer/PHP: tokenization of tokens related to union, intersection and DNF types in combination with PHP 8.4 final properties.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​908 : Tokenizer/PHP: tokenization of ? in nullable types for readonly properties.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​916 : Tokenizer/PHP: goto was not recognized as a terminating statement for a case/default in a switch control structure.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
Other
  • PHP_CodeSniffer 4.0 is coming soon! Interested in a sneak peek ? Join the live stream at any time on April 14, 15, 17 or 18.
    Read the open invitation (#​924) for all the details.

v3.12.0

Compare Source

Added
  • Added support for PHP 8.4 final properties to File::getMemberProperties() through a new is_final array index in the return value. #​834
  • Generators/HTML: each section title now has a unique anchor link, which can be copied when hovering over a title. #​859
    • This should make sharing a link to a specific section of the documentation more straight-forward.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Documentation for the following sniffs:
    • Squiz.Classes.ClassFileName
    • Squiz.Classes.ValidClassName
    • Thanks to [Brian Dunne][@​braindawg] for the patches.
Changed
  • PHPCBF: the messaging when no fixable errors are found will now distinguish between "No violations" (at all) versus "No fixable errors". #​806
  • The -h (Help) option now contains a more extensive list of "config" options which can be set. #​809
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Improved error message when invalid sniff codes are supplied to --sniffs or --exclude command line arguments. #​344
  • Improved error message when an invalid generator name is supplied to the --generator command line argument. #​709, #​771
    • The generator name will now also always be handled case-insensitively, independently of the OS used.
    • Thanks to [Rodrigo Primo][@​rodrigoprimo] for the patch.
  • The user will be shown an informative error message for sniffs missing one of the required methods. #​873
    • Previously this would result in a fatal error.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Ruleset processing will now be allowed to run to its conclusion - barring critical errors - before displaying all ruleset errors in one go. #​857
    • Previously an error in a ruleset would cause PHPCS to exit immediately and show only one error at a time.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Generators: XML documentation files which don't contain any actual documentation will now silently be ignored. #​755
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Generators: when the title attribute is missing, the documentation generation will now fall back to the sniff name as the title. #​820
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Generators: cleaner output based on the elements of the documentation which are available. #​819, #​821
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Generators/HTML: improved display of code tables by using semantic HTML. #​854
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Squiz.Classes.ClassFileName: recommend changing the file name instead of changing the class name. #​845
    • This prevents unactionable recommendations due to the file name not translating to a valid PHP symbol name.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Squiz.Functions.FunctionDeclarationArgumentSpacing: incorrect spacing after a comma followed by a promoted property has an improved error message and will now be flagged with the SpacingBeforePropertyModifier or NoSpaceBeforePropertyModifier error codes. #​792
    • This was previously already flagged, but using either the SpacingBeforeHint or NoSpaceBeforeHint error code, which was misleading.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Squiz.Functions.FunctionDeclarationArgumentSpacing: the sniff will now also check the spacing after property modifiers for promoted properties in constructor methods. #​792
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Squiz.WhiteSpace.ScopeKeywordSpacing: the sniff will now also check the spacing after the final and abstract modifier keywords. #​604
    • Thanks to [Klaus Purer][@​klausi] for the patch.
  • The following sniff(s) have received efficiency improvements:
    • Squiz.WhiteSpace.ScopeKeywordSpacing
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patches.
  • Incorrectly set inline properties (in test case files) will be silently ignored again. #​884
    • This removes the Internal.PropertyDoesNotExist error code.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The AbstractMethodUnitTest class will now flag duplicate test case markers in a test case file. #​773
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Various housekeeping, including improvements to the tests and documentation.
Deprecated

All deprecation are slated for removal in PHP_CodeSniffer 4.0.

  • Support for sniffs not implementing the PHPCS Sniff interface. See #​694.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Support for including sniffs which don't comply with the PHPCS naming conventions (by referencing the sniff file directly). See #​689.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Support for external standards named "Internal". See #​799.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • The following Generator methods are now (soft) deprecated. See #​755:
    • PHP_CodeSniffer\Generators\Text::printTitle() in favour of PHP_CodeSniffer\Generators\Text::getFormattedTitle()
    • PHP_CodeSniffer\Generators\Text::printTextBlock() in favour of PHP_CodeSniffer\Generators\Text::getFormattedTextBlock()
    • PHP_CodeSniffer\Generators\Text::printCodeComparisonBlock() in favour of PHP_CodeSniffer\Generators\Text::getFormattedCodeComparisonBlock()
    • PHP_CodeSniffer\Generators\Markdown::printHeader() in favour of PHP_CodeSniffer\Generators\Markdown::getFormattedHeader()
    • PHP_CodeSniffer\Generators\Markdown::printFooter() in favour of PHP_CodeSniffer\Generators\Markdown::getFormattedFooter()
    • PHP_CodeSniffer\Generators\Markdown::printTextBlock() in favour of PHP_CodeSniffer\Generators\Markdown::getFormattedTextBlock()
    • PHP_CodeSniffer\Generators\Markdown::printCodeComparisonBlock() in favour of PHP_CodeSniffer\Generators\Markdown::getFormattedCodeComparisonBlock()
    • PHP_CodeSniffer\Generators\HTML::printHeader() in favour of PHP_CodeSniffer\Generators\HTML::getFormattedHeader()
    • PHP_CodeSniffer\Generators\HTML::printToc() in favour of PHP_CodeSniffer\Generators\HTML::getFormattedToc()
    • PHP_CodeSniffer\Generators\HTML::printFooter() in favour of PHP_CodeSniffer\Generators\HTML::getFormattedFooter()
    • PHP_CodeSniffer\Generators\HTML::printTextBlock() in favour of PHP_CodeSniffer\Generators\HTML::getFormattedTextBlock()
    • PHP_CodeSniffer\Generators\HTML::printCodeComparisonBlock() in favour of PHP_CodeSniffer\Generators\HTML::getFormattedCodeComparisonBlock()
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
Fixed
  • Fixed bug #​794 : Generators: prevent fatal error when the XML documentation does not comply with the expected format.
  • Fixed bug #​814 : Generic.NamingConventions.ConstructorName: prevent potential fatal errors during live coding.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​816 : File::getDeclarationName(): prevent incorrect result for unfinished closures during live coding.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​817 : Squiz.Classes.ValidClassName: ignore comments when determining the name to be validated.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​825 : Squiz.Classes.ClassDeclaration: false positives when the next thing after a class was a function with an attribute attached.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​826 : Squiz.WhiteSpace.FunctionSpacing: prevent incorrect some results when attributes are attached to a function.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​827 : PEAR.Functions.FunctionDeclaration: fixer conflict over an unfinished closure during live coding.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​828 : Squiz.WhiteSpace.MemberVarSpacing: allow for readonly properties.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​832 : Squiz.WhiteSpace.MemberVarSpacing: prevent potential fixer conflict during live coding.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​833 : Squiz.PHP.EmbeddedPhp: fixer conflict when a PHP open tag for a multi-line snippet is found on the same line as a single-line embedded PHP snippet.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​833 : Squiz.PHP.EmbeddedPhp: incorrect indent calculation in certain specific situations.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​835 : Generic.PHP.DisallowShortOpenTag: don't act on parse errors.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​838 : Squiz.PHP.EmbeddedPhp: no new line before close tag was incorrectly enforced when a preceding OO construct or function had a trailing comment after the close curly.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​840 : Squiz.WhiteSpace.MemberVarSpacing: more accurate reporting on blank lines in the property "pre-amble" (i.e. docblock, attributes).
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​845 : Squiz.Classes.ClassFileName: don't throw an incorrect error for an unfinished OO declaration during live coding.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​865 : Setting an array property to an empty array from an XML ruleset now works correctly.
    • Previously, the property value would be set to [0 => ''].
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​866 : Squiz.WhiteSpace.FunctionOpeningBraceSpace: XML docs were not accessible due to an issue with the file name.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
Other
  • A new wiki page is available to clarify the difference between a project ruleset and an external standard.
    • This wiki page also contains detailed information about the naming conventions external standards must comply with.
  • A new XMLLint validate action runner is available which can be used in CI to validate rulesets for PHP_CodeSniffer against the XSD.

v3.11.3

Compare Source

Changed
  • Generic.ControlStructures.InlineControlStructure no longer unnecessarily listens for T_SWITCH tokens. #​595
  • Squiz.Functions.FunctionDeclarationArgumentSpacing: improvements to error message for SpaceBeforeComma error. #​783
  • The following sniff(s) have received efficiency improvements:
    • Squiz.Functions.FunctionDeclarationArgumentSpacing
    • Thanks to [Dan Wallis][@​fredden] and [Juliette Reinders Folmer][@​jrfnl] for the patches.
  • Various housekeeping, including improvements to the tests and documentation.
Fixed
  • Fixed bug #​620 : Squiz.Functions.FunctionDeclarationArgumentSpacing: newlines after type will now be handled by the fixer. This also prevents a potential fixer conflict.
  • Fixed bug #​782 : Tokenizer/PHP: prevent an "Undefined array key" notice during live coding for unfinished arrow functions.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line after reference token was not flagged nor fixed.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line after variadic token was not flagged nor fixed.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line before/after the equal sign for default values was not flagged nor fixed when equalsSpacing was set to 0.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer conflict when a new line is found before/after the equal sign for default values and equalsSpacing was set to 1.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer for spacing before/after equal sign could inadvertently remove comment.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer will now handle comments between the end of a parameter and a comma more cleanly.
    • Thanks to [Juliette Reinders Folmer][@​jrfnl] for the patch.
  • Fixed bug #​784 : Squiz.WhiteSpace.FunctionSpacing: prevent fixer conflict when a multi-line docblock would start on the same line as the function close curly being examined.
    • Thanks to [Klaus Purer][@​klausi] for the patch

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) | require-dev | minor | `3.11.2` -> `3.13.1` | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>PHPCSStandards/PHP_CodeSniffer (squizlabs/php_codesniffer)</summary> ### [`v3.13.1`](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/CHANGELOG.md#3131---2025-06-13) [Compare Source](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.0...3.13.1) ##### Added - Added support for PHP 8.4 properties with asymmetric visibility to File::getMemberProperties() through a new `set_scope` array index in the return value. [#&#8203;1116] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. - Added support for PHP 8.4 (constructor promoted) properties with asymmetric visibility to File::getMethodParameters() through new `set_visibility` and `set_visibility_token` array indexes in the return value. [#&#8203;1116] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. - Added support for PHP 8.4 asymmetric visibility modifiers to the following sniffs: - Generic.PHP.LowerCaseKeyword [#&#8203;1117] - PEAR.NamingConventions.ValidVariableName [#&#8203;1118] - PSR2.Classes.PropertyDeclaration [#&#8203;1119] - Squiz.Commenting.BlockComment [#&#8203;1120] - Squiz.Commenting.DocCommentAlignment [#&#8203;1120] - Squiz.Commenting.VariableComment [#&#8203;1120] - Squiz.Functions.FunctionDeclarationArgumentSpacing [#&#8203;1121] - Squiz.Scope.MemberVarScope [#&#8203;1122] - Squiz.WhiteSpace.MemberVarSpacing [#&#8203;1123] - Squiz.WhiteSpace.ScopeKeywordSpacing [#&#8203;1124] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. ##### Changed - The PSR2.Classes.PropertyDeclaration will now check that a set-visibility modifier keyword is placed after a potential general visibility keyword. [#&#8203;1119] - Errors will be reported via a new `AvizKeywordOrder` error code. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The Squiz.Functions.FunctionDeclarationArgumentSpacing will now check spacing after a set-visibility modifier keyword. [#&#8203;1121] - Errors will be reported via a new `SpacingAfterSetVisibility` error code. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The Squiz.Scope.MemberVarScope will now flag missing "read" visibility, when "write" visibility is set, under a separate error code `AsymReadMissing`. [#&#8203;1122] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The documentation for the following sniffs has been improved: - PEAR.Classes.ClassDeclaration - Squiz.WhiteSpace.FunctionOpeningBraceSpace - Thanks to \[Brian Dunne]\[[@&#8203;braindawg](https://github.com/braindawg)] and \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] for the patches. - Various housekeeping, including improvements to the tests and documentation. - Thanks to \[Dan Wallis]\[[@&#8203;fredden](https://github.com/fredden)], \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] and \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for their contributions. ##### Other - The latest PHP_CodeSniffer XSD file is now available via the following permalink: <https://schema.phpcodesniffer.com/phpcs.xsd>. [#&#8203;1094] Older XSD files can be referenced via permalinks based on their minor: `https://schema.phpcodesniffer.com/#.#/phpcs.xsd`. - The GPG signature for the PHAR files has been rotated. The new fingerprint is: [`D91D869`](https://github.com/PHPCSStandards/PHP_CodeSniffer/commit/D91D86963AF3A29B6520462297B02DD8E5071466). [#&#8203;1094]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1094 [#&#8203;1116]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1116 [#&#8203;1117]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1117 [#&#8203;1118]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1118 [#&#8203;1119]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1119 [#&#8203;1120]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1120 [#&#8203;1121]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1121 [#&#8203;1122]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1122 [#&#8203;1123]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1123 [#&#8203;1124]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1124 ### [`v3.13.0`](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/CHANGELOG.md#3130---2025-05-11) [Compare Source](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.2...3.13.0) ##### Added - Added support for PHP 8.4 asymmetric visibility modifiers to the tokenizer. [#&#8203;871] - Thanks to \[Daniel Scherzer]\[[@&#8203;DanielEScherzer](https://github.com/DanielEScherzer)] for the patch. - Added support for PHP 8.4 `final` properties to the following sniffs: - PSR2.Classes.PropertyDeclaration [#&#8203;950] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. ##### Changed - Generic.WhiteSpace.LanguageConstructSpacing: will now also check the spacing after the `goto` language construct keyword. [#&#8203;917] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The PSR2.Classes.PropertyDeclaration will now check that the `final` modifier keyword is placed before a visibility keyword. [#&#8203;950] - Errors will be reported via a new `FinalAfterVisibility` error code. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Improved Help information about the `--reports` CLI flag. [#&#8203;1078] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The documentation for the following sniffs has been improved: - PSR1.Files.SideEffects - PSR2.ControlStructures.SwitchDeclaration - PSR2.Namespaces.NamespaceDeclaration - Thanks to \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] for the patches. - Various housekeeping, including improvements to the tests and documentation. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for their contributions. ##### 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. [#&#8203;888] - The deprecated Generator methods. [#&#8203;889] - The old array property setting format (via comma separated strings). [#&#8203;890] - Sniffs not implementing the `PHP_CodeSniffer\Sniffs\Sniff` interface. [#&#8203;891] - Sniffs not following the naming conventions. [#&#8203;892] - Standards called Internal. [#&#8203;893] - Sniffs which don't listen for PHP, like JS/CSS specific sniffs. [#&#8203;894] - The deprecation notices can be silenced by using the `-q` (=quiet) CLI flag. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. ##### Fixed - Fixed bug [#&#8203;1040] : Generic.Strings.UnnecessaryHeredoc - false positive for heredocs containing escape sequences. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;1040] : Generic.Strings.UnnecessaryHeredoc - fixer would not clean up escape sequences which aren't necessary in nowdocs. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;1048] : A file under scan would sometimes be updated with partial fixes, even though the file "failed to fix". - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. ##### 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][wiki-upgrade-guide-users-40], as well as for [sniff developers and integrators][wiki-upgrade-guide-devs-40], have been published to the Wiki to help smooth the transition. [wiki-upgrade-guide-users-40]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Version-4.0-User-Upgrade-Guide [wiki-upgrade-guide-devs-40]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Version-4.0-Developer-Upgrade-Guide [#&#8203;871]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/871 [#&#8203;888]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/888 [#&#8203;889]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/889 [#&#8203;890]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/890 [#&#8203;891]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/891 [#&#8203;892]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/892 [#&#8203;893]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/893 [#&#8203;894]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/894 [#&#8203;917]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/917 [#&#8203;950]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/950 [#&#8203;1040]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1040 [#&#8203;1048]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1048 [#&#8203;1078]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1078 ### [`v3.12.2`](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/CHANGELOG.md#3122---2025-04-13) [Compare Source](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.1...3.12.2) ##### Added - Added support for PHP 8.4 `final` properties to the following sniffs: - Generic.PHP.LowerCaseConstant [#&#8203;948] - Generic.PHP.UpperCaseConstant [#&#8203;948] - Squiz.Commenting.DocCommentAlignment [#&#8203;951] - Squiz.Commenting.VariableComment [#&#8203;949] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. ##### Changed - Tokenizer/PHP: a PHP open tag at the very end of a file will now always be tokenized as T_OPEN_TAG, independently of the PHP version. [#&#8203;937] - Previously, a PHP open tag at the end of a file was not tokenized as an open tag on PHP < 7.4 and the tokenization would depend on the `short_open_tag` setting. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - PEAR.Commenting.FunctionComment: improved message for "blank lines between docblock and declaration" check. [#&#8203;830] - The documentation for the following sniffs has been improved: - Generic.Functions.OpeningFunctionBraceBsdAllman - Generic.Functions.OpeningFunctionBraceKernighanRitchie - Generic.WhiteSpace.LanguageConstructSpacing - Thanks to \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] for the patches. - Various housekeeping, including improvements to the tests and documentation. - Thanks to \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] and \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for their contributions. ##### Fixed - Fixed bug [#&#8203;830] : PEAR.Commenting.FunctionComment will no longer remove blank lines within attributes. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;929] : Generic.PHP.ForbiddenFunctions: prevent false positives/negatives for code interlaced with comments. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;934] : Generic.PHP.LowerCaseConstant and Generic.PHP.UpperCaseConstant will now correctly ignore DNF types for properties. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;936] : Squiz.Commenting.FunctionCommentThrowTag: sniff would bow out when function has attributes attached, leading to false negatives. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;940] : Squiz.Commenting.VariableComment: false positive for missing docblock for properties using DNF types. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;944] : Squiz.Commenting.FunctionComment did not support DNF/intersection types in `@param` tags. - Thanks to \[Jeffrey Angenent]\[[@&#8203;devfrey](https://github.com/devfrey)] for the patch. - Fixed bug [#&#8203;945] : Squiz.WhiteSpace.FunctionSpacing would get confused when there are two docblocks above a function declaration. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;947] : Squiz.Commenting.FunctionCommentThrowTag: prevent false positives/negatives for code interlaced with comments. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;951] : Squiz.Commenting.DocCommentAlignment did not examine docblocks for `final` classes. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;955] : Potential race condition, leading to a fatal error, when both the `Diff` + the `Code` reports are requested and caching is on. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;956] : Generic.WhiteSpace.ScopeIndent: undefined array index notice when running in debug mode. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. [#&#8203;830]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/830 [#&#8203;929]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/929 [#&#8203;934]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/934 [#&#8203;936]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/936 [#&#8203;937]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/937 [#&#8203;940]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/940 [#&#8203;944]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/944 [#&#8203;945]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/945 [#&#8203;947]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/947 [#&#8203;948]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/948 [#&#8203;949]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/949 [#&#8203;951]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/951 [#&#8203;955]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/955 [#&#8203;956]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/956 ### [`v3.12.1`](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/CHANGELOG.md#3121---2025-04-04) [Compare Source](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.0...3.12.1) ##### Added - Documentation for the following sniffs: - Squiz.Commenting.BlockComment - Thanks to \[Colin Stewart]\[[@&#8203;costdev](https://github.com/costdev)] for the patch. ##### Changed - Generic.WhiteSpace.HereNowdocIdentifierSpacing: improved error message text. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Various housekeeping, including improvements to the tests and documentation. - Thanks to \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] and \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for their contributions. ##### Deprecated - The `Generic.Functions.CallTimePassByReference` sniff. See [#&#8203;921]. - This sniff will be removed in version 4.0.0. ##### Fixed - Fixed bug [#&#8203;906] : Fixer: prevent `InvalidArgumentException`s when displaying verbose information. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;907] : Tokenizer/PHP: tokenization of tokens related to union, intersection and DNF types in combination with PHP 8.4 final properties. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;908] : Tokenizer/PHP: tokenization of `?` in nullable types for readonly properties. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;916] : Tokenizer/PHP: `goto` was not recognized as a terminating statement for a case/default in a switch control structure. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. ##### Other - PHP_CodeSniffer 4.0 is coming soon! Interested in a sneak peek ? Join the live stream at any time on April 14, 15, 17 or 18. Read the open invitation ([#&#8203;924]) for all the details. [#&#8203;906]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/906 [#&#8203;907]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/907 [#&#8203;908]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/908 [#&#8203;916]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/916 [#&#8203;921]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/921 [#&#8203;924]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/924 ### [`v3.12.0`](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/CHANGELOG.md#3120---2025-03-18) [Compare Source](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.3...3.12.0) ##### Added - Added support for PHP 8.4 `final` properties to File::getMemberProperties() through a new `is_final` array index in the return value. [#&#8203;834] - Thanks to \[Daniel Scherzer]\[[@&#8203;DanielEScherzer](https://github.com/DanielEScherzer)] for the patch. - Generators/HTML: each section title now has a unique anchor link, which can be copied when hovering over a title. [#&#8203;859] - This should make sharing a link to a specific section of the documentation more straight-forward. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Documentation for the following sniffs: - Squiz.Classes.ClassFileName - Squiz.Classes.ValidClassName - Thanks to \[Brian Dunne]\[[@&#8203;braindawg](https://github.com/braindawg)] for the patches. ##### Changed - PHPCBF: the messaging when no fixable errors are found will now distinguish between "No violations" (at all) versus "No fixable errors". [#&#8203;806] - Thanks to \[Peter Wilson]\[[@&#8203;peterwilsoncc](https://github.com/peterwilsoncc)] for the patch. - The `-h` (Help) option now contains a more extensive list of "config" options which can be set. [#&#8203;809] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Improved error message when invalid sniff codes are supplied to `--sniffs` or `--exclude` command line arguments. [#&#8203;344] - Thanks to \[Dan Wallis]\[[@&#8203;fredden](https://github.com/fredden)] for the patch. - Improved error message when an invalid generator name is supplied to the `--generator` command line argument. [#&#8203;709], [#&#8203;771] - The generator name will now also always be handled case-insensitively, independently of the OS used. - Thanks to \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] for the patch. - The user will be shown an informative error message for sniffs missing one of the required methods. [#&#8203;873] - Previously this would result in a fatal error. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Ruleset processing will now be allowed to run to its conclusion - barring critical errors - before displaying all ruleset errors in one go. [#&#8203;857] - Previously an error in a ruleset would cause PHPCS to exit immediately and show only one error at a time. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Generators: XML documentation files which don't contain any actual documentation will now silently be ignored. [#&#8203;755] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Generators: when the `title` attribute is missing, the documentation generation will now fall back to the sniff name as the title. [#&#8203;820] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Generators: cleaner output based on the elements of the documentation which are available. [#&#8203;819], [#&#8203;821] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Generators/HTML: improved display of code tables by using semantic HTML. [#&#8203;854] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Squiz.Classes.ClassFileName: recommend changing the file name instead of changing the class name. [#&#8203;845] - This prevents unactionable recommendations due to the file name not translating to a valid PHP symbol name. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Squiz.Functions.FunctionDeclarationArgumentSpacing: incorrect spacing after a comma followed by a promoted property has an improved error message and will now be flagged with the `SpacingBeforePropertyModifier` or `NoSpaceBeforePropertyModifier` error codes. [#&#8203;792] - This was previously already flagged, but using either the `SpacingBeforeHint` or `NoSpaceBeforeHint` error code, which was misleading. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Squiz.Functions.FunctionDeclarationArgumentSpacing: the sniff will now also check the spacing after property modifiers for promoted properties in constructor methods. [#&#8203;792] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Squiz.WhiteSpace.ScopeKeywordSpacing: the sniff will now also check the spacing after the `final` and `abstract` modifier keywords. [#&#8203;604] - Thanks to \[Klaus Purer]\[[@&#8203;klausi](https://github.com/klausi)] for the patch. - The following sniff(s) have received efficiency improvements: - Squiz.WhiteSpace.ScopeKeywordSpacing - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. - Incorrectly set inline properties (in test case files) will be silently ignored again. [#&#8203;884] - This removes the `Internal.PropertyDoesNotExist` error code. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The AbstractMethodUnitTest class will now flag duplicate test case markers in a test case file. [#&#8203;773] - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Various housekeeping, including improvements to the tests and documentation. - Thanks to \[Asis Pattisahusiwa]\[[@&#8203;asispts](https://github.com/asispts)], \[Dan Wallis]\[[@&#8203;fredden](https://github.com/fredden)], \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] and \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for their contributions. ##### Deprecated All deprecation are slated for removal in PHP_CodeSniffer 4.0. - Support for sniffs not implementing the PHPCS `Sniff` interface. See [#&#8203;694]. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Support for including sniffs which don't comply with the PHPCS naming conventions (by referencing the sniff file directly). See [#&#8203;689]. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Support for external standards named "Internal". See [#&#8203;799]. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - The following Generator methods are now (soft) deprecated. See [#&#8203;755]: - `PHP_CodeSniffer\Generators\Text::printTitle()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedTitle()` - `PHP_CodeSniffer\Generators\Text::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedTextBlock()` - `PHP_CodeSniffer\Generators\Text::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedCodeComparisonBlock()` - `PHP_CodeSniffer\Generators\Markdown::printHeader()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedHeader()` - `PHP_CodeSniffer\Generators\Markdown::printFooter()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedFooter()` - `PHP_CodeSniffer\Generators\Markdown::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedTextBlock()` - `PHP_CodeSniffer\Generators\Markdown::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedCodeComparisonBlock()` - `PHP_CodeSniffer\Generators\HTML::printHeader()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedHeader()` - `PHP_CodeSniffer\Generators\HTML::printToc()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedToc()` - `PHP_CodeSniffer\Generators\HTML::printFooter()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedFooter()` - `PHP_CodeSniffer\Generators\HTML::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedTextBlock()` - `PHP_CodeSniffer\Generators\HTML::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedCodeComparisonBlock()` - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. ##### Fixed - Fixed bug [#&#8203;794] : Generators: prevent fatal error when the XML documentation does not comply with the expected format. - It is recommended to validate XML documentation files against the XSD file: <https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd> - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;814] : Generic.NamingConventions.ConstructorName: prevent potential fatal errors during live coding. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;816] : File::getDeclarationName(): prevent incorrect result for unfinished closures during live coding. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;817] : Squiz.Classes.ValidClassName: ignore comments when determining the name to be validated. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;825] : Squiz.Classes.ClassDeclaration: false positives when the next thing after a class was a function with an attribute attached. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;826] : Squiz.WhiteSpace.FunctionSpacing: prevent incorrect some results when attributes are attached to a function. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;827] : PEAR.Functions.FunctionDeclaration: fixer conflict over an unfinished closure during live coding. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;828] : Squiz.WhiteSpace.MemberVarSpacing: allow for `readonly` properties. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;832] : Squiz.WhiteSpace.MemberVarSpacing: prevent potential fixer conflict during live coding. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;833] : Squiz.PHP.EmbeddedPhp: fixer conflict when a PHP open tag for a multi-line snippet is found on the same line as a single-line embedded PHP snippet. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;833] : Squiz.PHP.EmbeddedPhp: incorrect indent calculation in certain specific situations. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;835] : Generic.PHP.DisallowShortOpenTag: don't act on parse errors. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;838] : Squiz.PHP.EmbeddedPhp: no new line before close tag was incorrectly enforced when a preceding OO construct or function had a trailing comment after the close curly. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;840] : Squiz.WhiteSpace.MemberVarSpacing: more accurate reporting on blank lines in the property "pre-amble" (i.e. docblock, attributes). - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;845] : Squiz.Classes.ClassFileName: don't throw an incorrect error for an unfinished OO declaration during live coding. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;865] : Setting an array property to an empty array from an XML ruleset now works correctly. - Previously, the property value would be set to `[0 => '']`. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;866] : Squiz.WhiteSpace.FunctionOpeningBraceSpace: XML docs were not accessible due to an issue with the file name. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. ##### Other - A new [wiki page][wiki-about-standards] is available to clarify the difference between a project ruleset and an external standard. - This wiki page also contains detailed information about the naming conventions external standards must comply with. - A new [XMLLint validate][xmllint-validate] action runner is available which can be used in CI to validate rulesets for PHP_CodeSniffer against the XSD. [wiki-about-standards]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/About-Standards-for-PHP_CodeSniffer [xmllint-validate]: https://github.com/marketplace/actions/xmllint-validate [#&#8203;344]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/344 [#&#8203;604]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/604 [#&#8203;689]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/689 [#&#8203;694]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/694 [#&#8203;709]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/709 [#&#8203;755]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/755 [#&#8203;771]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/771 [#&#8203;773]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/773 [#&#8203;792]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/792 [#&#8203;794]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/794 [#&#8203;799]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/799 [#&#8203;806]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/806 [#&#8203;809]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/809 [#&#8203;814]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/814 [#&#8203;816]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/816 [#&#8203;817]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/817 [#&#8203;819]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/819 [#&#8203;820]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/820 [#&#8203;821]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/821 [#&#8203;825]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/825 [#&#8203;826]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/826 [#&#8203;827]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/827 [#&#8203;828]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/828 [#&#8203;832]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/832 [#&#8203;833]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/833 [#&#8203;834]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/834 [#&#8203;835]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/835 [#&#8203;838]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/838 [#&#8203;840]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/840 [#&#8203;845]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/845 [#&#8203;854]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/854 [#&#8203;857]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/857 [#&#8203;859]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/859 [#&#8203;865]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/865 [#&#8203;866]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/866 [#&#8203;873]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/873 [#&#8203;884]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/884 ### [`v3.11.3`](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/CHANGELOG.md#3113---2025-01-23) [Compare Source](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.2...3.11.3) ##### Changed - Generic.ControlStructures.InlineControlStructure no longer unnecessarily listens for T_SWITCH tokens. [#&#8203;595] - Thanks to \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] for the patch. - Squiz.Functions.FunctionDeclarationArgumentSpacing: improvements to error message for `SpaceBeforeComma` error. [#&#8203;783] - The following sniff(s) have received efficiency improvements: - Squiz.Functions.FunctionDeclarationArgumentSpacing - Thanks to \[Dan Wallis]\[[@&#8203;fredden](https://github.com/fredden)] and \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patches. - Various housekeeping, including improvements to the tests and documentation. - Thanks to \[Michał Bundyra]\[[@&#8203;michalbundyra](https://github.com/michalbundyra)], \[Rodrigo Primo]\[[@&#8203;rodrigoprimo](https://github.com/rodrigoprimo)] and \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for their contributions. ##### Fixed - Fixed bug [#&#8203;620] : Squiz.Functions.FunctionDeclarationArgumentSpacing: newlines after type will now be handled by the fixer. This also prevents a potential fixer conflict. - Thanks to \[Dan Wallis]\[[@&#8203;fredden](https://github.com/fredden)] for the patch. - Fixed bug [#&#8203;782] : Tokenizer/PHP: prevent an "Undefined array key" notice during live coding for unfinished arrow functions. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;783] : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line after reference token was not flagged nor fixed. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;783] : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line after variadic token was not flagged nor fixed. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;783] : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line before/after the equal sign for default values was not flagged nor fixed when `equalsSpacing` was set to `0`. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;783] : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer conflict when a new line is found before/after the equal sign for default values and `equalsSpacing` was set to `1`. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;783] : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer for spacing before/after equal sign could inadvertently remove comment. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;783] : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer will now handle comments between the end of a parameter and a comma more cleanly. - Thanks to \[Juliette Reinders Folmer]\[[@&#8203;jrfnl](https://github.com/jrfnl)] for the patch. - Fixed bug [#&#8203;784] : Squiz.WhiteSpace.FunctionSpacing: prevent fixer conflict when a multi-line docblock would start on the same line as the function close curly being examined. - Thanks to \[Klaus Purer]\[[@&#8203;klausi](https://github.com/klausi)] for the patch [#&#8203;595]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/595 [#&#8203;620]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/620 [#&#8203;782]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/782 [#&#8203;783]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/783 [#&#8203;784]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/784 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuOCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS44IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
renovate-bot changed title from chore(deps): update dependency squizlabs/php_codesniffer to v3.11.3 to chore(deps): update dependency squizlabs/php_codesniffer to v3.12.0 2025-03-18 06:09:09 +00:00
renovate-bot force-pushed renovate/squizlabs-php_codesniffer-3.x-lockfile from 04c1d23548 to 0e177b5323 2025-03-30 17:08:51 +00:00 Compare
renovate-bot force-pushed renovate/squizlabs-php_codesniffer-3.x-lockfile from 0e177b5323 to 3bc20b3abc 2025-04-04 13:11:20 +00:00 Compare
renovate-bot changed title from chore(deps): update dependency squizlabs/php_codesniffer to v3.12.0 to chore(deps): update dependency squizlabs/php_codesniffer to v3.12.1 2025-04-04 13:11:23 +00:00
renovate-bot force-pushed renovate/squizlabs-php_codesniffer-3.x-lockfile from 3bc20b3abc to 1408b64ca0 2025-04-13 05:11:25 +00:00 Compare
renovate-bot changed title from chore(deps): update dependency squizlabs/php_codesniffer to v3.12.1 to chore(deps): update dependency squizlabs/php_codesniffer to v3.12.2 2025-04-13 05:11:28 +00:00
renovate-bot force-pushed renovate/squizlabs-php_codesniffer-3.x-lockfile from 1408b64ca0 to c77099f251 2025-05-16 16:36:32 +00:00 Compare
renovate-bot changed title from chore(deps): update dependency squizlabs/php_codesniffer to v3.12.2 to chore(deps): update dependency squizlabs/php_codesniffer to v3.13.0 2025-05-16 16:36:33 +00:00
renovate-bot force-pushed renovate/squizlabs-php_codesniffer-3.x-lockfile from c77099f251 to 8aaa019fdf 2025-06-11 23:06:19 +00:00 Compare
renovate-bot force-pushed renovate/squizlabs-php_codesniffer-3.x-lockfile from 8aaa019fdf to ba265f5f4a 2025-06-15 16:04:08 +00:00 Compare
renovate-bot changed title from chore(deps): update dependency squizlabs/php_codesniffer to v3.13.0 to chore(deps): update dependency squizlabs/php_codesniffer to v3.13.1 2025-06-15 16:04:09 +00:00
renovate-bot changed title from chore(deps): update dependency squizlabs/php_codesniffer to v3.13.1 to chore(deps): update dependency squizlabs/php_codesniffer to v3.13.1 - autoclosed 2025-06-19 20:03:01 +00:00
renovate-bot closed this pull request 2025-06-19 20:03:01 +00:00
Some checks failed
Tests / tests (7.4) (pull_request) Has been cancelled
Tests / tests (8.0) (pull_request) Has been cancelled
Tests / tests (8.1) (pull_request) Has been cancelled
Tests / tests (7.4) (push) Has been cancelled
Tests / tests (8.0) (push) Has been cancelled
Tests / tests (8.1) (push) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: PrivateCoffee/alltube#13
No description provided.