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(); }