From 626984e93177905b4e4a695db8e905aa1ec95c41 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 1 Mar 2023 17:37:28 +0100 Subject: [PATCH] Tests/PHPCSVersions: add PHPCS 3.7.2/3.8.0 to the mix Refs: * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.7.2 * https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.8.0 --- tests/PHPCSVersions.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/PHPCSVersions.php b/tests/PHPCSVersions.php index 0ea9e5ce..62748d01 100644 --- a/tests/PHPCSVersions.php +++ b/tests/PHPCSVersions.php @@ -86,6 +86,8 @@ final class PHPCSVersions '3.6.2' => '3.6.2', '3.7.0' => '3.7.0', '3.7.1' => '3.7.1', + '3.7.2' => '3.7.2', + '3.8.0' => '3.8.0', ); /** @@ -354,10 +356,19 @@ function ($version) { break; case '8.3': + $versions = array_filter( + self::$allPhpcsVersions, + function ($version) { + // PHPCS 3.8.0 is the first PHPCS version with runtime support for PHP 8.3. + return version_compare($version, '3.8.0', '>='); + } + ); + break; + case '8.4': /* - * At this point in time, it is unclear as of which PHPCS version PHP 8.3/8.4 will be supported. - * In other words: tests should only use dev-master/4.x when on PHP 8.3/8.4 for the time being. + * At this point in time, it is unclear as of which PHPCS version PHP 8.4 will be supported. + * In other words: tests should only use dev-master/4.x when on PHP 8.4 for the time being. */ $versions = array(); break;