Repository navigation
3.3.0
·
171 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
- Support for attributes on anonymous classes (PHP 8.0) and
readonlyanonymous classes (PHP 8.3) to theWordPress.Security.EscapeOutputsniff. Props @rodrigoprimo. #2559 - Support for handling "exit as a function call" (PHP 8.4) to the
WordPress.Security.EscapeOutputsniff. #2563 - WordPress-Extra: the following sniffs have been added to the ruleset:
Universal.Attributes.BracketSpacingandUniversal.Attributes.DisallowAttributeParentheses. #2646
Changed
- The minimum supported PHP version is now PHP 7.2 (was PHP 5.4). #2614
- The minimum required
PHP_CodeSnifferversion to 3.13.4 (was 3.13.0). #2630 - The minimum required
PHPCSExtraversion to 1.5.0 (was 1.4.0). #2646 - The default value for
minimum_wp_version, as used by a number of sniffs detecting usage of deprecated WP features, has been updated to6.6. #2656 WordPress.DB.DirectDatabaseQuerywill now recognize more caching functions, like thewp_cache_*_multiple()functions as added in WordPress 6.0 and thewp_cache_*_salted()functions as added in WordPress 6.9. #2654WordPress.NamingConventions.PrefixAllGlobalshas been updated to recognize pluggable functions introduced in WP up to WP 6.9.0. #2652WordPress.WP.ClassNameCasehas been updated to recognize classes introduced in WP up to WP 6.9.0. #2652WordPress.WP.DeprecatedFunctionsnow detects functions deprecated in WordPress up to WP 6.9.0. #2652WordPress.WP.DeprecatedParametersnow detects parameters deprecated in WordPress up to WP 6.9.0. #2652WordPress.Security.ValidatedSanitizedInput: improved the clarity of the error message for theInputNotValidatederror code. Props @rodrigoprimo. #2642- README: updated
testVersionrecommendations for PHPCompatibility. Props @johnjago. #2471 - Example ruleset: updated the
minimum_wp_versionandtestVersionrecommendations. #2608 - All sniffs are now also being tested against PHP 8.5 for consistent sniff results. #2649
- Various housekeeping, including documentation and test improvements. Includes contributions by @rodrigoprimo.
Deprecated
- The
WordPress.PHP.POSIXFunctionssniff (as it is no longer relevant). #2616
Removed
wp_kses_allowed_html()from the list of escaping functions. #2566
This affects theWordPress.Security.EscapeOutputsniff.
Fixed
WordPress.DB.DirectDatabaseQuery: false positive when function call to caching functions did not use the canonical function name. Props @rodrigoprimo. #2613WordPress.DB.DirectDatabaseQuery: potential false negative when a class property or constant would mirror the name of one of the caching functions. Props @rodrigoprimo. #2615WordPress.DB.PreparedSQL: false positive for correctly escaped SQL snippets when the function call did not use the canonical function name. Props @rodrigoprimo. #2570WordPress.DB.PreparedSQLPlaceholders: improved handling of fully qualified calls to global functions. Props @rodrigoprimo. #2569WordPress.Security.EscapeOutput: expanded protection against false positives for*::class. Props @rodrigoprimo. #2605WordPress.Security.NonceVerification: false positive when nonce checking function call did not use the canonical function name. Props @rodrigoprimo. #2572WordPress.WP.EnqueuedResourceParameters: the sniff could cause a PHP 8.5 deprecation notice if the code under scan contained one of the deprecated type casts. #2573WordPress.WP.EnqueuedResourceParameters: improved recognition of non-lowercase and fully qualifiedtrue/false/nullwhen passed as the$verparameter value. Props @rodrigoprimo. #2630