1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

#10026 converted version_compare() to direct comparison with PHP_VERSION_ID

This commit is contained in:
Thomas Bley 2023-07-21 22:42:27 +02:00
parent 7f39dab07b
commit fda483a98b
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class DateTimeTest extends TestCase
{
$context = new Context();
if (version_compare(PHP_VERSION, '8.3', '>')) {
if (PHP_VERSION_ID >= 8_03_00) {
$this->expectException(Exception::class);
$this->expectExceptionMessage('DateTime::modify(): Failed to parse time string (foo) at position 0 (f)');
}

View File

@ -77,7 +77,7 @@ trait ValidCodeAnalysisTestTrait
$codebase->config->visitPreloadedStubFiles($codebase);
// avoid MethodSignatureMismatch for __unserialize/() when extending DateTime
if (version_compare(PHP_VERSION, '8.2', '>')) {
if (PHP_VERSION_ID >= 8_02_00) {
$this->addStubFile(
'stubOne.phpstub',
'<?php