Skip to content

Commit e3bcee3

Browse files
committed
Update codesniffer rulesets
* squizlabs/php_codesniffer 3.12.2 → 3.13.2 * mediawiki/mediawiki-codesniffer 47.0.0 → 48.0.0 * phpcompatibility/phpcompatibility-wp 2.1.7 → 2.1.8 * phpcsstandards/phpcsextra 1.2.1 → 1.4.0 * phpcsstandards/phpcsutils 1.0.12 → 1.1.1 * wp-coding-standards/wpcs 3.1.0 → 3.2.0 mediawiki/mediawiki-codesniffer v48 drops support for PHP 8.0, so we do as well. We run it with a later version anyway (8.2, soon 8.4).
1 parent 818cbc0 commit e3bcee3

File tree

28 files changed

+131
-78
lines changed

28 files changed

+131
-78
lines changed

composer.lock

Lines changed: 60 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Replace `MediaWiki.Usage.NestedFunctions` with `Squiz.PHP.InnerFunctions`.
4+
5+

projects/packages/boost-speed-score/tests/php/lib/Url_Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function test_normalize( $input, $expected ) {
2424
// Dumb, but functional remove_query_arg polyfill.
2525
// @phan-suppress-next-line PhanPluginUnreachableCode
2626
if ( ! function_exists( 'remove_query_arg' ) ) {
27-
// phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
27+
// phpcs:ignore Squiz.PHP.InnerFunctions.NotAllowed
2828
function remove_query_arg( $parameters, $url ) {
2929
foreach ( $parameters as $parameter ) {
3030
$url = preg_replace( sprintf( '~&?%s=[^&]+~', preg_quote( $parameter, '~' ) ), '', $url );
@@ -35,7 +35,7 @@ function remove_query_arg( $parameters, $url ) {
3535

3636
// wp_parse_url in new PHP versions is the same as the native parse_url.
3737
if ( ! function_exists( 'wp_parse_url' ) ) {
38-
// phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
38+
// phpcs:ignore Squiz.PHP.InnerFunctions.NotAllowed
3939
function wp_parse_url( $url ) {
4040
return parse_url( $url );
4141
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Replace `MediaWiki.Usage.NestedFunctions` with `Squiz.PHP.InnerFunctions`.
4+
5+

projects/packages/classic-theme-helper/src/content-options/customizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Jetpack_Customize_Control_Title extends WP_Customize_Control {
7474
/**
7575
* Render the control's content.
7676
*/
77-
public function render_content() { // phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
77+
public function render_content() { // phpcs:ignore Squiz.PHP.InnerFunctions.NotAllowed
7878
?>
7979
<span class="customize-control-title"><?php echo wp_kses_post( $this->label ); ?></span>
8080
<?php

projects/packages/codesniffer/Jetpack/ruleset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
-->
2727
<rule ref="MediaWiki.Usage.InArrayUsage" />
2828
<rule ref="MediaWiki.Usage.MagicConstantClosure" />
29-
<rule ref="MediaWiki.Usage.NestedFunctions" />
29+
<rule ref="Squiz.PHP.InnerFunctions" /> <!-- Formerly MediaWiki.Usage.NestedFunctions -->
3030
<rule ref="MediaWiki.Usage.PlusStringConcat" />
3131
<rule ref="MediaWiki.Usage.ReferenceThis" />
3232
<rule ref="MediaWiki.WhiteSpace.EmptyLinesBetweenUse" />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: major
2+
Type: removed
3+
4+
Drop support for PHP 8.0, following upstream `mediawiki/mediawiki-codesniffer` package.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: major
2+
Type: changed
3+
4+
Update `mediawiki/mediawiki-codesniffer` to v48.0.0.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: major
2+
Type: changed
3+
4+
Replace `MediaWiki.Usage.NestedFunctions` with `Squiz.PHP.InnerFunctions`.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Update tests for WPCS adding `Generic.Strings.UnnecessaryHeredoc`.
4+
5+

0 commit comments

Comments
 (0)