chore(deps-dev): bump wp-coding-standards/wpcs from 3.1.0 to 3.2.0
Bumps wp-coding-standards/wpcs from 3.1.0 to 3.2.0.
Release notes
Sourced from wp-coding-standards/wpcs's releases.
3.2.0
Added
- New
WordPress.WP.GetMetaSinglesniff to theWordPress-Extraruleset. Props@rodrigoprimo! #2465 This sniff warns whenget_*_meta()andget_metadata*()functions are used with the$meta_key/$keyparam, but without the$singleparameter as this could lead to unexpected behavior due to the different return types.WordPress-Extra: the following additional sniffs have been added to the ruleset:Generic.Strings.UnnecessaryHeredocandGeneric.WhiteSpace.HereNowdocIdentifierSpacing. #2534- The
rest_sanitize_boolean()functions to the list of known "sanitizing" functions. Props@westonruter. #2530- End-user documentation to the following existing sniffs:
WordPress.DB.PreparedSQL(props@jaymcp, #2454),WordPress.NamingConventions.ValidFunctionName(props@richardkorthuisand@rodrigoprimo, #2452, #2531),WordPress.NamingConventions.ValidVariableName(props@richardkorthuis, #2457). This documentation can be exposed via thePHP_CodeSniffer--generator=...command-line argument.Changed
- The minimum required
PHP_CodeSnifferversion to 3.13.0 (was 3.9.0). #2532- The minimum required
PHPCSUtilsversion to 1.1.0 (was 1.0.10). #2532- The minimum required
PHPCSExtraversion to 1.4.0 (was 1.2.1). #2532- Sniffs based on the
AbstractFunctionParameterSniffwill now call a dedicatedprocess_first_class_callable()method for PHP 8.1+ first class callables. Props@rodrigoprimo,@jrfnl. #2518, #2544 By default, the method won't do anything, but individual sniffs extending theAbstractFunctionParameterSniffclass can choose to implement the method to handle first class callables. Previously, first class callables were treated as a function call without parameters and would trigger theprocess_no_parameters()method.- The minimum required prefix length for the
WordPress.NamingConventions.PrefixAllGlobalssniff has been changed from 3 to 4 characters. Props@davidperezgar. #2479- The default value for
minimum_wp_version, as used by a number of sniffs detecting usage of deprecated WP features, has been updated to6.5. #2553WordPress.NamingConventions.ValidVariableNamenow allows for PHP 8.4 properties in interfaces. #2532WordPress.NamingConventions.PrefixAllGlobalshas been updated to recognize pluggable functions introduced in WP up to WP 6.8.1. #2537WordPress.WP.Capabilitieshas been updated to recognize new capabilities introduced in WP up to WP 6.8.1. #2537WordPress.WP.ClassNameCasehas been updated to recognize classes introduced in WP up to WP 6.8.1. #2537WordPress.WP.DeprecatedFunctionsnow detects functions deprecated in WordPress up to WP 6.8.1. #2537WordPress.WP.DeprecatedParametersnow detects parameters deprecated in WordPress up to WP 6.8.1. #2537WordPress.WP.DeprecatedParameterValuesnow detects parameter values deprecated in WordPress up to WP 6.8.1. #2537- Minor performance improvements.
- Developer happiness: prevent creating a
composer.lockfile. Thanks@fredden! #2443- Various housekeeping, including documentation and test improvements. Includes contributions by
@rodrigoprimoand@szepeviktor.- All sniffs are now also being tested against PHP 8.4 for consistent sniff results. #2511
Deprecated
Removed
- The
Generic.Functions.CallTimePassByReferencehas been removed from theWordPress-Extraruleset. Props@rodrigoprimo. #2536 This sniff was dated anyway and deprecated in PHP_CodeSniffer. If you need to check if your code is PHP cross-version compatible, use the [PHPCompatibility] standard instead.Fixed
- Sniffs based on the
AbstractClassRestrictionsSniffcould previously run into a PHPCSInternal.Exception, leading to fixes not being made. #2500- Sniffs based on the
AbstractFunctionParameterSniffwill now bow out more often when it is sure the code under scan is not calling the target function and during live coding, preventing false positives. Props@rodrigoprimo. #2518
Changelog
Sourced from wp-coding-standards/wpcs's changelog.
[3.2.0] - 2025-07-24
Added
- New
WordPress.WP.GetMetaSinglesniff to theWordPress-Extraruleset. Props [@rodrigoprimo]! #2465 This sniff warns whenget_*_meta()andget_metadata*()functions are used with the$meta_key/$keyparam, but without the$singleparameter as this could lead to unexpected behavior due to the different return types.WordPress-Extra: the following additional sniffs have been added to the ruleset:Generic.Strings.UnnecessaryHeredocandGeneric.WhiteSpace.HereNowdocIdentifierSpacing. #2534- The
rest_sanitize_boolean()functions to the list of known "sanitizing" functions. Props [@westonruter]. #2530- End-user documentation to the following existing sniffs:
WordPress.DB.PreparedSQL(props [@jaymcp], #2454),WordPress.NamingConventions.ValidFunctionName(props [@richardkorthuis] and [@rodrigoprimo], #2452, #2531),WordPress.NamingConventions.ValidVariableName(props [@richardkorthuis], #2457). This documentation can be exposed via thePHP_CodeSniffer--generator=...command-line argument.Changed
- The minimum required
PHP_CodeSnifferversion to 3.13.0 (was 3.9.0). #2532- The minimum required
PHPCSUtilsversion to 1.1.0 (was 1.0.10). #2532- The minimum required
PHPCSExtraversion to 1.4.0 (was 1.2.1). #2532- Sniffs based on the
AbstractFunctionParameterSniffwill now call a dedicatedprocess_first_class_callable()method for PHP 8.1+ first class callables. Props [@rodrigoprimo], [@jrfnl]. #2518, #2544 By default, the method won't do anything, but individual sniffs extending theAbstractFunctionParameterSniffclass can choose to implement the method to handle first class callables. Previously, first class callables were treated as a function call without parameters and would trigger theprocess_no_parameters()method.- The minimum required prefix length for the
WordPress.NamingConventions.PrefixAllGlobalssniff has been changed from 3 to 4 characters. Props [@davidperezgar]. #2479- The default value for
minimum_wp_version, as used by a number of sniffs detecting usage of deprecated WP features, has been updated to6.5. #2553WordPress.NamingConventions.ValidVariableNamenow allows for PHP 8.4 properties in interfaces. #2532WordPress.NamingConventions.PrefixAllGlobalshas been updated to recognize pluggable functions introduced in WP up to WP 6.8.1. #2537WordPress.WP.Capabilitieshas been updated to recognize new capabilities introduced in WP up to WP 6.8.1. #2537WordPress.WP.ClassNameCasehas been updated to recognize classes introduced in WP up to WP 6.8.1. #2537WordPress.WP.DeprecatedFunctionsnow detects functions deprecated in WordPress up to WP 6.8.1. #2537WordPress.WP.DeprecatedParametersnow detects parameters deprecated in WordPress up to WP 6.8.1. #2537WordPress.WP.DeprecatedParameterValuesnow detects parameter values deprecated in WordPress up to WP 6.8.1. #2537- Minor performance improvements.
- Developer happiness: prevent creating a
composer.lockfile. Thanks [@fredden]! #2443- Various housekeeping, including documentation and test improvements. Includes contributions by [
@rodrigoprimo] and [@szepeviktor].- All sniffs are now also being tested against PHP 8.4 for consistent sniff results. #2511
Deprecated
Removed
- The
Generic.Functions.CallTimePassByReferencehas been removed from theWordPress-Extraruleset. Props [@rodrigoprimo]. #2536 This sniff was dated anyway and deprecated in PHP_CodeSniffer. If you need to check if your code is PHP cross-version compatible, use the [PHPCompatibility] standard instead.Fixed
- Sniffs based on the
AbstractClassRestrictionsSniffcould previously run into a PHPCSInternal.Exception, leading to fixes not being made. #2500- Sniffs based on the
AbstractFunctionParameterSniffwill now bow out more often when it is sure the code under scan is not calling the target function and during live coding, preventing false positives. Props [@rodrigoprimo]. #2518#2443: WordPress/WordPress-Coding-Standards#2443 #2465: WordPress/WordPress-Coding-Standards#2465 #2452: WordPress/WordPress-Coding-Standards#2452 #2454: WordPress/WordPress-Coding-Standards#2454 #2457: WordPress/WordPress-Coding-Standards#2457 #2479: WordPress/WordPress-Coding-Standards#2479 #2500: WordPress/WordPress-Coding-Standards#2500 #2511: WordPress/WordPress-Coding-Standards#2511
... (truncated)
Commits
d2421deMerge pull request #2558 from WordPress/developd0140c8Merge pull request #2557 from WordPress/feature/changelog-3.2.04c8c11bMerge pull request #2561 from WordPress/feature/variablehelper-fix-docsa9b8a4bMerge pull request #2556 from WordPress/feature/changelog-fix-indentationd45070eVariableHelper::is_assignment(): fix parameter description512b3efCHANGELOG: fix indentation5f4e740Changelog for the release of WordPressCS 3.2.04d0160fNamingConventions/PrefixAllGlobals: update min prefix length from 3 to 4 char...0f2fadbMerge pull request #2553 from WordPress/feature/update-minimum-wp-version5428700AbstractFunctionParameterSniff: don't ignore first class callables (#2544)- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot will merge this PR once CI passes on it, as requested by @matticbot.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
The reviewers field in the dependabot.yml file will be removed soon. Please use the code owners file to specify reviewers for Dependabot PRs. For more information, see this blog post.
One of your CI runs failed on this pull request, so Dependabot won't merge it.
Dependabot will still automatically merge this pull request if you amend it and your tests pass.