Skip to content

Commit

Permalink
vimeo#10026 added workaround for DateTimeInterface::__unserialize() s…
Browse files Browse the repository at this point in the history
…ignature
  • Loading branch information
thbley committed Jul 19, 2023
1 parent 0f99799 commit 804087b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Traits/ValidCodeAnalysisTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ public function testValidCode(
$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);
Expand Down

0 comments on commit 804087b

Please sign in to comment.