From 7a9adf372cfe0292b13e04f97fcfda9ddd7c0517 Mon Sep 17 00:00:00 2001 From: Yohann Tilotti Date: Mon, 11 Dec 2023 18:53:45 +0100 Subject: [PATCH] [Autocomplete] Fix choice_value bug - miss cache class --- src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php b/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php index 546cf4b0151..2b63e4bd69d 100644 --- a/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php +++ b/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php @@ -14,7 +14,7 @@ use Doctrine\ORM\EntityRepository; use Doctrine\ORM\QueryBuilder; use Symfony\Bundle\SecurityBundle\Security; -use Symfony\Component\Form\ChoiceList\Factory\Cache\ChoiceLabel; +use Symfony\Component\Form\ChoiceList\Factory\Cache; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; @@ -89,7 +89,7 @@ public function getLabel(object $entity): string return $this->propertyAccessor->getValue($entity, $choiceLabel); } - if ($choiceLabel instanceof ChoiceLabel) { + if ($choiceLabel instanceof Cache\ChoiceLabel) { $choiceLabel = $choiceLabel->getOption(); }