hi, i have little bit misunderstanding
In docs Documentation
return DateTimeInterface
In source php-couchbase/result.c at master · couchbase/php-couchbase · GitHub
return DateTimeImmutable
when create implements GetResult
e.g. based on phpstorm-stubs/couchbase.php at master · JetBrains/phpstorm-stubs · GitHub
$result = (new class implements GetResult {
public function content(): ?array {
return null;
}
public function expiryTime(): ?DateTimeInterface {
return null;
}
public function cas(): ?string
{
return null;
}
});
catch the error "must be compatible with Couchbase\GetResult::expiryTime(): ?DateTimeImmutable"
and if replace with ?DateTimeImmutable
e.g.
public function expiryTime(): ?DateTimeImmutable {
return null;
}
all done
i create fix request to phpstorm-stubs fix: must be compatible with GetResult::expiryTime(): ?DateTimeImmutable by real420og · Pull Request #1085 · JetBrains/phpstorm-stubs · GitHub
but maybe i’m missing some details