Skip to content

Commit e29d0e9

Browse files
committed
Bugfix: Missed a spot using getUnderlyingReflector
1 parent d540f73 commit e29d0e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Tools/SchemaValidator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Doctrine\ORM\Mapping\FieldMapping;
2424
use ReflectionEnum;
2525
use ReflectionNamedType;
26-
use ReflectionProperty;
2726

2827
use function array_diff;
2928
use function array_filter;
@@ -330,7 +329,7 @@ private function validatePropertiesTypes(ClassMetadata $class): array
330329
array_map(
331330
function (FieldMapping $fieldMapping) use ($class): string|null {
332331
$fieldName = $fieldMapping->fieldName;
333-
$propertyType = (new ReflectionProperty($fieldMapping->declared ?: $class->name, $fieldName))->getType();
332+
$propertyType = $class->propertyAccessors[$fieldName]->getUnderlyingReflector()->getType();
334333

335334
// If the field type is not a built-in type, we cannot check it
336335
if (! Type::hasType($fieldMapping->type)) {

0 commit comments

Comments
 (0)