From 11061d535bb5faf77a1c7ec5797a6824060f7071 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Tue, 12 Mar 2024 20:51:29 +0100 Subject: [PATCH] build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0 Change-Id: I3fd4f1a1eeca8d82961eef6a0fa4f1a469259b58 --- composer.json | 7 ++++++- includes/Hooks.php | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 7c532e4e5e..e9842aaa44 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "mediawiki/mediawiki-codesniffer": "41.0.0", + "mediawiki/mediawiki-codesniffer": "43.0.0", "mediawiki/mediawiki-phan-config": "0.14.0", "mediawiki/minus-x": "1.1.1", "php-parallel-lint/php-console-highlighter": "1.0.0", @@ -18,5 +18,10 @@ ], "phan": "phan -d . --long-progress-bar", "phpcs": "phpcs -sp --cache --ignore=*/node_modules/" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/includes/Hooks.php b/includes/Hooks.php index 83a29103fa..efc9728f9d 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -284,7 +284,7 @@ class Hooks implements } $version = $matches[1]; foreach ( $rules as $rule ) { - list( $op, $matchVersion ) = $rule; + [ $op, $matchVersion ] = $rule; if ( ( $op === '<' && $version < $matchVersion ) || ( $op === '>' && $version > $matchVersion ) || @@ -1219,7 +1219,7 @@ class Hooks implements 'lib/ve/lib/jquery.uls/src/jquery.uls.data.js', 'lib/ve/lib/jquery.uls/src/jquery.uls.data.utils.js', ], - ] ] ); + ] ] ); } }