Skip to content

Commit 64aaddf

Browse files
Merge branch '6.4' into 7.2
* 6.4: Fix php.net links [DoctrineBridge] Restore compatibility with Doctrine ODM by validating $class object type [FrameworkBundle] Add functional tests for the `ContainerLintCommand` command Fix precision loss when rounding large integers in `NumberToLocalizedStringTransformer`
2 parents 293d519 + 5bed64d commit 64aaddf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Validator/Constraints/UniqueEntityValidator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Validator\Constraints;
1313

14-
use Doctrine\ORM\Mapping\ClassMetadata as OrmClassMetadata;
1514
use Doctrine\ORM\Mapping\MappingException as ORMMappingException;
1615
use Doctrine\Persistence\ManagerRegistry;
1716
use Doctrine\Persistence\Mapping\ClassMetadata;
@@ -294,7 +293,7 @@ private function getFieldValues(mixed $object, ClassMetadata $class, array $fiel
294293
throw new ConstraintDefinitionException(\sprintf('The field "%s" is not a property of class "%s".', $fieldName, $objectClass));
295294
}
296295

297-
if ($isValueEntity && $object instanceof ($class->getName()) && property_exists(OrmClassMetadata::class, 'propertyAccessors')) {
296+
if ($isValueEntity && $object instanceof ($class->getName()) && property_exists($class, 'propertyAccessors')) {
298297
$fieldValues[$entityFieldName] = $class->propertyAccessors[$fieldName]->getValue($object);
299298
} elseif ($isValueEntity && $object instanceof ($class->getName())) {
300299
$fieldValues[$entityFieldName] = $class->reflFields[$fieldName]->getValue($object);

0 commit comments

Comments
 (0)