Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 60 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Replace `MediaWiki.Usage.NestedFunctions` with `Squiz.PHP.InnerFunctions`.


Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function test_normalize( $input, $expected ) {
// Dumb, but functional remove_query_arg polyfill.
// @phan-suppress-next-line PhanPluginUnreachableCode
if ( ! function_exists( 'remove_query_arg' ) ) {
// phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
// phpcs:ignore Squiz.PHP.InnerFunctions.NotAllowed
function remove_query_arg( $parameters, $url ) {
foreach ( $parameters as $parameter ) {
$url = preg_replace( sprintf( '~&?%s=[^&]+~', preg_quote( $parameter, '~' ) ), '', $url );
Expand All @@ -35,7 +35,7 @@ function remove_query_arg( $parameters, $url ) {

// wp_parse_url in new PHP versions is the same as the native parse_url.
if ( ! function_exists( 'wp_parse_url' ) ) {
// phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
// phpcs:ignore Squiz.PHP.InnerFunctions.NotAllowed
function wp_parse_url( $url ) {
return parse_url( $url );
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Remove `MediaWiki.Usage.NestedFunctions`, `Squiz.PHP.InnerFunctions` is ok with function→class→function.


Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Jetpack_Customize_Control_Title extends WP_Customize_Control {
/**
* Render the control's content.
*/
public function render_content() { // phpcs:ignore MediaWiki.Usage.NestedFunctions.NestedFunction
public function render_content() {
?>
<span class="customize-control-title"><?php echo wp_kses_post( $this->label ); ?></span>
<?php
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/codesniffer/Jetpack/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
-->
<rule ref="MediaWiki.Usage.InArrayUsage" />
<rule ref="MediaWiki.Usage.MagicConstantClosure" />
<rule ref="MediaWiki.Usage.NestedFunctions" />
<rule ref="Squiz.PHP.InnerFunctions" /> <!-- Formerly MediaWiki.Usage.NestedFunctions -->
<rule ref="MediaWiki.Usage.PlusStringConcat" />
<rule ref="MediaWiki.Usage.ReferenceThis" />
<rule ref="MediaWiki.WhiteSpace.EmptyLinesBetweenUse" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: major
Type: removed

Drop support for PHP 8.0, following upstream `mediawiki/mediawiki-codesniffer` package.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: major
Type: changed

Update `mediawiki/mediawiki-codesniffer` to v48.0.0.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: major
Type: changed

Replace `MediaWiki.Usage.NestedFunctions` with `Squiz.PHP.InnerFunctions`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Update tests for WPCS adding `Generic.Strings.UnnecessaryHeredoc`.


4 changes: 2 additions & 2 deletions projects/packages/codesniffer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"testing"
],
"require": {
"php": ">=8.0",
"php": ">=8.1",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"mediawiki/mediawiki-codesniffer": "^47.0",
"mediawiki/mediawiki-codesniffer": "^48.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"sirbrillig/phpcs-variable-analysis": "^2.10",
"wp-coding-standards/wpcs": "^3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// phpcs:disable Squiz.Commenting.ClassComment.Missing, Squiz.Commenting.FunctionComment.Missing
// phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
// phpcs:disable Jetpack.PHPUnit.TestClassName.DoesNotMatchFileName
// phpcs:disable Squiz.Strings.DoubleQuoteUsage.NotRequired, WordPress.Arrays.ArrayDeclarationSpacing, Universal.Arrays.DisallowShortArraySyntax, PHPCompatibility.Syntax.NewFlexibleHeredocNowdoc
// phpcs:disable Squiz.Strings.DoubleQuoteUsage.NotRequired, WordPress.Arrays.ArrayDeclarationSpacing, Universal.Arrays.DisallowShortArraySyntax, PHPCompatibility.Syntax.NewFlexibleHeredocNowdoc, Generic.Strings.UnnecessaryHeredoc.Found


use PHPUnit\Framework\Attributes\TestWith;
Expand Down
Loading
Loading