Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency squizlabs/php_codesniffer to v3.12.0 #611

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 23, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
squizlabs/php_codesniffer 3.11.2 -> 3.12.0 age adoption passing confidence

Release Notes

PHPCSStandards/PHP_CodeSniffer (squizlabs/php_codesniffer)

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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/squizlabs-php_codesniffer-3.x-lockfile branch from 2ad5285 to 71cb623 Compare March 3, 2025 16:19
@renovate renovate bot force-pushed the renovate/squizlabs-php_codesniffer-3.x-lockfile branch 2 times, most recently from cec47ea to 7a8bc00 Compare March 17, 2025 17:38

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@renovate renovate bot force-pushed the renovate/squizlabs-php_codesniffer-3.x-lockfile branch from 7a8bc00 to 159f9e8 Compare March 18, 2025 06:29
@renovate renovate bot changed the title Update dependency squizlabs/php_codesniffer to v3.11.3 Update dependency squizlabs/php_codesniffer to v3.12.0 Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants