From 5d74b3ab0ac37ac6f38ebf853248e86bdb38a608 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 17 Nov 2021 10:58:52 +0100 Subject: [PATCH] fix errors when clearing cache --- .../ChillMainBundle/Command/ChillImportUsersCommand.php | 6 +++--- src/Bundle/ChillMainBundle/config/services/command.yaml | 1 + .../ChillPersonBundle/config/services/controller.yaml | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php b/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php index d3fb6980f..b9c0116d3 100644 --- a/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php +++ b/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php @@ -59,14 +59,14 @@ class ChillImportUsersCommand extends Command EntityManagerInterface $em, LoggerInterface $logger, UserPasswordEncoderInterface $passwordEncoder, - ValidatorInterface $validator + ValidatorInterface $validator, + UserRepository $userRepository ) { $this->em = $em; $this->passwordEncoder = $passwordEncoder; $this->validator = $validator; $this->logger = $logger; - - $this->userRepository = $em->getRepository(User::class); + $this->userRepository = $userRepository; parent::__construct('chill:main:import-users'); } diff --git a/src/Bundle/ChillMainBundle/config/services/command.yaml b/src/Bundle/ChillMainBundle/config/services/command.yaml index 5df80c2ad..a005f9944 100644 --- a/src/Bundle/ChillMainBundle/config/services/command.yaml +++ b/src/Bundle/ChillMainBundle/config/services/command.yaml @@ -5,6 +5,7 @@ services: $logger: '@Psr\Log\LoggerInterface' $passwordEncoder: '@Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface' $validator: '@Symfony\Component\Validator\Validator\ValidatorInterface' + $userRepository: '@Chill\MainBundle\Repository\UserRepository' tags: - { name: console.command } diff --git a/src/Bundle/ChillPersonBundle/config/services/controller.yaml b/src/Bundle/ChillPersonBundle/config/services/controller.yaml index b03ccf966..369fe63bb 100644 --- a/src/Bundle/ChillPersonBundle/config/services/controller.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/controller.yaml @@ -8,7 +8,6 @@ services: $eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface' $timelineBuilder: '@chill_main.timeline_builder' $paginatorFactory: '@chill_main.paginator_factory' - $authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper' tags: ['controller.service_arguments'] Chill\PersonBundle\Controller\AccompanyingPeriodController: