File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 23
23
use Doctrine \ORM \Mapping \FieldMapping ;
24
24
use ReflectionEnum ;
25
25
use ReflectionNamedType ;
26
- use ReflectionProperty ;
27
26
28
27
use function array_diff ;
29
28
use function array_filter ;
@@ -330,7 +329,7 @@ private function validatePropertiesTypes(ClassMetadata $class): array
330
329
array_map (
331
330
function (FieldMapping $ fieldMapping ) use ($ class ): string |null {
332
331
$ fieldName = $ fieldMapping ->fieldName ;
333
- $ propertyType = ( new ReflectionProperty ( $ fieldMapping -> declared ?: $ class ->name , $ fieldName) )->getType ();
332
+ $ propertyType = $ class ->propertyAccessors [ $ fieldName]-> getUnderlyingReflector ( )->getType ();
334
333
335
334
// If the field type is not a built-in type, we cannot check it
336
335
if (! Type::hasType ($ fieldMapping ->type )) {
You can’t perform that action at this time.
0 commit comments