Skip to content

Commit 301473d

Browse files
committed
Tests/PHPCSVersions: update for branching of PHP 8.5
The PHP project has branched off PHP 8.5, which is now in RC and PHP "master/nightly" is now what will become PHP 8.6 (or possible 9.0). As PHP 8.5 is now in RC, only bug fixes are allowed in, so no new deprecation notices are expected anymore. PHPCS has already released new versions fixing various PHP 8.5 deprecation notices, so PHPCS 3.13.4 can be presumed to be the first PHPCS version which is runtime compatible with PHP 8.5. Having said that, we could go back further as the functionality used by this plugin/the tests for this plugin would not be affected by the PHP 8.5 deprecation notices which affected PHPCS. Then again, for consistency, let's stick with the "official" PHPCS version with runtime support for PHP 8.5. Refs: * https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.13.4 * https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/4.0.0
1 parent 4df7d5d commit 301473d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/PHPCSVersions.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,19 @@ static function ($version) {
414414
break;
415415

416416
case '8.5':
417+
$versions = array_filter(
418+
self::$allPhpcsVersions,
419+
static function ($version) {
420+
// PHPCS 3.13.4 is the first PHPCS version with runtime support for PHP 8.5.
421+
return version_compare($version, '3.13.4', '>=');
422+
}
423+
);
424+
break;
425+
426+
case '8.6':
417427
/*
418-
* At this point in time, it is unclear as of which PHPCS version PHP 8.5 will be supported.
419-
* In other words: tests should only use dev-master/4.x when on PHP 8.5 for the time being.
428+
* At this point in time, it is unclear as of which PHPCS version PHP 8.6 will be supported.
429+
* In other words: tests should only use 4.x-dev when on PHP 8.6 for the time being.
420430
*/
421431
$versions = array();
422432
break;

0 commit comments

Comments
 (0)