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:
parent
7f39dab07b
commit
fda483a98b
@ -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)');
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user