From f48e197e0ba36b80e3015ced23b4ecec6c02c453 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 30 Jun 2022 07:29:33 +0200 Subject: [PATCH] [main] fix deprecations for Export/PickCenterType --- .../ChillMainBundle/Form/Type/Export/PickCenterType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index 2fe5ff8f2..1c6c01f72 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -75,14 +75,16 @@ class PickCenterType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { + + $export = $this->exportManager->getExport($options['export_alias']); $centers = $this->authorizationHelper->getReachableCenters( $this->user, - $export->requiredRole() + $export->requiredRole()->__toString() ); $builder->add(self::CENTERS_IDENTIFIERS, EntityType::class, [ - 'class' => 'ChillMainBundle:Center', + 'class' => Center::class, 'query_builder' => static function (EntityRepository $er) use ($centers) { $qb = $er->createQueryBuilder('c'); $ids = array_map(