mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
#10026 added workaround for DateTimeInterface::__unserialize() signature
This commit is contained in:
parent
0f99799fa9
commit
804087b5d5
@ -76,6 +76,19 @@ trait ValidCodeAnalysisTestTrait
|
||||
$codebase->enterServerMode();
|
||||
$codebase->config->visitPreloadedStubFiles($codebase);
|
||||
|
||||
if (version_compare(PHP_VERSION, '8.2.0', '>=')) {
|
||||
$this->addStubFile(
|
||||
'stubOne.phpstub',
|
||||
'<?php
|
||||
namespace {
|
||||
interface DateTimeInterface {
|
||||
public function __unserialize(mixed[] $data) {}
|
||||
}
|
||||
}
|
||||
',
|
||||
);
|
||||
}
|
||||
|
||||
$file_path = self::$src_dir_path . 'somefile.php';
|
||||
|
||||
$this->addFile($file_path, $code);
|
||||
|
Loading…
Reference in New Issue
Block a user