Skip to content

Commit 61c7d16

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: relax assertions for ICU 72.1 [Validator] Fix regression with class metadatada on parent classes [VarExporter] Fix exporting classes with __serialize() but not __unserialize() [HttpFoundation][HttpKernel] Fix deprecations when `Content-Type` is `null`
2 parents ab48b4d + 98b275b commit 61c7d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Validator/DoctrineLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function loadClassMetadata(ClassMetadata $metadata): bool
105105
if (isset($mapping['originalClass']) && !str_contains($mapping['declaredField'], '.')) {
106106
$metadata->addPropertyConstraint($mapping['declaredField'], new Valid());
107107
$loaded = true;
108-
} elseif (property_exists($className, $mapping['fieldName'])) {
108+
} elseif (property_exists($className, $mapping['fieldName']) && (!$doctrineMetadata->isMappedSuperclass || $metadata->getReflectionClass()->getProperty($mapping['fieldName'])->isPrivate())) {
109109
$metadata->addPropertyConstraint($mapping['fieldName'], new Length(['max' => $mapping['length']]));
110110
$loaded = true;
111111
}

0 commit comments

Comments
 (0)