From d7783a17608d23241fa4a70d9890002e99101602 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:11:00 -0700 Subject: [PATCH] Update mediawiki/mediawiki-codesniffer requirement from 41.0.0 to 45.0.0 (#134) * Update mediawiki/mediawiki-codesniffer requirement from 41.0.0 to 45.0.0 Updates the requirements on [mediawiki/mediawiki-codesniffer](https://github.com/wikimedia/mediawiki-tools-codesniffer) to permit the latest version. - [Changelog](https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/HISTORY.md) - [Commits](https://github.com/wikimedia/mediawiki-tools-codesniffer/compare/v41.0.0...v45.0.0) --- updated-dependencies: - dependency-name: mediawiki/mediawiki-codesniffer dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add * CI: lint code to MediaWiki standards Check commit and GitHub actions for more details --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CosmicAlpha Co-authored-by: github-actions --- composer.json | 7 ++++++- includes/services/Helpers/InfoboxParamsValidator.php | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 7f6de7b..7bc344d 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "", "license": "GPL-3.0-or-later", "require-dev": { - "mediawiki/mediawiki-codesniffer": "41.0.0", + "mediawiki/mediawiki-codesniffer": "45.0.0", "mediawiki/mediawiki-phan-config": "0.12.1", "mediawiki/minus-x": "1.1.3", "php-parallel-lint/php-console-highlighter": "1.0.0", @@ -21,5 +21,10 @@ ], "phan": "phan -d . --long-progress-bar", "phpcs": "phpcs -sp --cache" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/includes/services/Helpers/InfoboxParamsValidator.php b/includes/services/Helpers/InfoboxParamsValidator.php index 31a9ae1..4033ac9 100644 --- a/includes/services/Helpers/InfoboxParamsValidator.php +++ b/includes/services/Helpers/InfoboxParamsValidator.php @@ -221,9 +221,9 @@ class InfoboxParamsValidator { } if ( isset( self::$colorNamesFlipped[$color] ) || - preg_match( self::REGEX_RGB, $color ) || + preg_match( self::REGEX_RGB, $color ) || preg_match( self::REGEX_RGBA, $color ) || - preg_match( self::REGEX_HSL, $color ) || + preg_match( self::REGEX_HSL, $color ) || preg_match( self::REGEX_HSLA, $color ) ) { return $color;