Skip to content

Commit e30d171

Browse files
committed
Fix #3047
1 parent a0c9eff commit e30d171

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Bridge/NelmioApiDoc/Parser/ApiPlatformParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private function parseProperty(ResourceMetadata $resourceMetadata, PropertyMetad
235235
if ('object' === $builtinType) {
236236
$className = $type->getClassName();
237237

238-
if (is_subclass_of($className, \DateTimeInterface::class)) {
238+
if (is_a($className, \DateTimeInterface::class, true)) {
239239
$data['dataType'] = DataTypes::DATETIME;
240240
$data['format'] = sprintf('{DateTime %s}', \DateTime::RFC3339);
241241

src/Swagger/Serializer/DocumentationNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ private function getType(bool $v3, string $type, bool $isCollection, ?string $cl
675675
return ['type' => 'string'];
676676
}
677677

678-
if (is_subclass_of($className, \DateTimeInterface::class)) {
678+
if (is_a($className, \DateTimeInterface::class, true)) {
679679
return ['type' => 'string', 'format' => 'date-time'];
680680
}
681681

0 commit comments

Comments
 (0)