diff --git a/docs/source/development/pagination/example.php b/docs/source/development/pagination/example.php index bdf18f166..e56d2c845 100644 --- a/docs/source/development/pagination/example.php +++ b/docs/source/development/pagination/example.php @@ -15,7 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller; class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController { - public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) + public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, private readonly \Chill\MainBundle\Pagination\PaginatorFactoryInterface $paginatorFactory) { } public function yourAction(): \Symfony\Component\HttpFoundation\Response @@ -27,7 +27,7 @@ class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractControl ->getSingleScalarResult(); // get the PaginatorFactory - $paginatorFactory = $this->get('chill_main.paginator_factory'); + $paginatorFactory = $this->paginatorFactory; // create a pagination instance. This instance is only valid for // the current route and parameters diff --git a/docs/source/development/useful-snippets/controller-secured-for-person.php b/docs/source/development/useful-snippets/controller-secured-for-person.php index 94f7777fd..1e6199ecc 100644 --- a/docs/source/development/useful-snippets/controller-secured-for-person.php +++ b/docs/source/development/useful-snippets/controller-secured-for-person.php @@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Role\Role; class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController { - public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) + public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, private readonly \Chill\PersonBundle\Repository\PersonRepository $personRepository) { } /** @@ -31,7 +31,7 @@ class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\ public function listAction($id): \Symfony\Component\HttpFoundation\Response { /** @var \Chill\PersonBundle\Entity\Person $person */ - $person = $this->get('chill.person.repository.person') + $person = $this->personRepository ->find($id); if (null === $person) { diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php index 01f9f8b26..a621327b6 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php @@ -202,7 +202,7 @@ final class ActivityControllerTest extends WebTestCase private function createFakeUser(): \Chill\MainBundle\Entity\User { $container = self::$kernel->getContainer(); - $em = $container->get('doctrine.orm.entity_manager'); + $em = $container->get(\Doctrine\ORM\EntityManager::class); // get the social PermissionGroup, and remove CHILL_ACTIVITY_* $socialPermissionGroup = $em @@ -244,7 +244,7 @@ final class ActivityControllerTest extends WebTestCase private function getActivitiesForPerson(\Chill\PersonBundle\Entity\Person $person) { $em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $activities = $em->getRepository(\Chill\ActivityBundle\Entity\Activity::class) ->findBy(['person' => $person]); @@ -273,7 +273,7 @@ final class ActivityControllerTest extends WebTestCase private function getPersonFromFixtures() { $em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy([ @@ -296,7 +296,7 @@ final class ActivityControllerTest extends WebTestCase private function getRandomActivityReason(array $excludeIds = []) { $reasons = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class) ->findAll(); @@ -315,7 +315,7 @@ final class ActivityControllerTest extends WebTestCase private function getRandomActivityType() { $types = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(ActivityType::class) ->findAll(); @@ -331,7 +331,7 @@ final class ActivityControllerTest extends WebTestCase private function getRandomScope($username, $centerName) { $user = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneByUsername($username); @@ -340,20 +340,20 @@ final class ActivityControllerTest extends WebTestCase } $center = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneByName($centerName); // get scope reachable by both role UPDATE and DELETE $reachableScopesUpdate = self::$kernel->getContainer() - ->get('chill.main.security.authorization.helper') + ->get(\Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface::class) ->getReachableScopes( $user, 'CHILL_ACTIVITY_UPDATE', $center ); $reachableScopesDelete = self::$kernel->getContainer() - ->get('chill.main.security.authorization.helper') + ->get(\Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface::class) ->getReachableScopes( $user, 'CHILL_ACTIVITY_DELETE', diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php index ed5a6c0f3..6be406993 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php @@ -29,7 +29,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialActionAggregator::class); } public function getAggregator(): BySocialActionAggregator diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php index e042e40cb..6f62e69d3 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php @@ -29,7 +29,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialIssueAggregator::class); } public function getAggregator(): BySocialIssueAggregator diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php index cad83d383..e3acd538e 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php @@ -41,7 +41,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest $request->getLocale()->willReturn('fr'); - self::getContainer()->get('request_stack') + self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request->reveal()); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php index d144fe7a3..0ab03dcfd 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php @@ -34,14 +34,14 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.activity.export.user_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator::class); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::getContainer()->get('request_stack') + self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request->reveal()); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php index a92a49cbb..2ef945e8a 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php @@ -28,7 +28,7 @@ final class SumActivityVisitDurationTest extends AbstractExportTest { self::bootKernel(); - $this->export = self::getContainer()->get('chill.activity.export.sum_activity_visit_duration_linked_to_acp'); + $this->export = self::getContainer()->get(\Chill\ActivityBundle\Export\Export\LinkedToACP\SumActivityVisitDuration::class); } public function getExport() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php index 91a532b74..6578ec113 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php @@ -39,7 +39,7 @@ final class ListActivityTest extends AbstractExportTest $request->getLocale()->willReturn('fr'); - self::getContainer()->get('request_stack') + self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request->reveal()); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php index 0d090ab82..8745c9b58 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php @@ -33,7 +33,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.activity.export.reason_filter'); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter::class); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php index 547cc1c06..e66740bcf 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php @@ -31,7 +31,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.activity.export.type_filter'); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\ActivityTypeFilter::class); } public function getFilter(): ActivityTypeFilter diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php index 9b2b8ed1c..cc333a473 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php @@ -31,7 +31,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.activity.export.reason_filter'); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter::class); } public function getFilter(): ActivityReasonFilter diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php index aaca43dc9..a49eb2d3b 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php @@ -30,7 +30,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter'); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter::class); } public function getFilter(): PersonHavingActivityBetweenDateFilter diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php index 5f32ae5f9..e45096af1 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php @@ -32,7 +32,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter'); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter::class); $request = $this->prophesize() ->willExtend(Request::class); diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php index fd66424df..c59c99707 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php @@ -44,7 +44,7 @@ class ActivityTypeTest extends KernelTestCase $prophet = new Prophet(); $this->formBuilder = static::getContainer() - ->get('form.factory') + ->get(\Symfony\Component\Form\FormFactoryInterface::class) ->createBuilder(FormType::class, null, [ 'csrf_protection' => false, 'csrf_field_name' => '_token', @@ -54,10 +54,10 @@ class ActivityTypeTest extends KernelTestCase $request->setLocale('fr'); self::$kernel->getContainer() - ->get('request_stack') + ->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request); - $em = static::getContainer()->get('doctrine.orm.entity_manager'); + $em = static::getContainer()->get(\Doctrine\ORM\EntityManager::class); $this->user = $em ->getRepository(User::class) @@ -68,7 +68,7 @@ class ActivityTypeTest extends KernelTestCase $token = $prophet->prophesize(); $token->willExtend(AbstractToken::class); $token->getUser()->willReturn($this->user); - static::getContainer()->get('security.token_storage') + static::getContainer()->get(\Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface::class) ->setToken($token->reveal()); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php index c246bf829..9925a34f6 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php @@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\ActivityType; use Chill\ActivityBundle\Form\Type\TranslatableActivityType; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Form\Extension\Core\Type\FormType; +use Symfony\Component\Form\FormFactoryInterface; /** * @internal @@ -33,7 +34,7 @@ class TranslatableActivityTypeTest extends KernelTestCase self::bootKernel(); $this->builder = self::getContainer() - ->get('form.factory') + ->get(FormFactoryInterface::class) ->createBuilder(FormType::class, null, [ 'csrf_protection' => false, 'csrf_field_name' => '_token', @@ -42,7 +43,7 @@ class TranslatableActivityTypeTest extends KernelTestCase $request = new \Symfony\Component\HttpFoundation\Request(); $request->setLocale('fr'); - static::getContainer()->get('request_stack') + static::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request); } @@ -87,7 +88,7 @@ class TranslatableActivityTypeTest extends KernelTestCase */ protected function getRandomType(mixed $active = true) { - $types = static::getContainer()->get('doctrine.orm.entity_manager') + $types = static::getContainer()->get(\Doctrine\ORM\EntityManager::class) ->getRepository(ActivityType::class) ->findBy(['active' => $active]); diff --git a/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php index 49c95f3bf..122b128d9 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php @@ -70,7 +70,7 @@ final class RemoteCalendarMSGraphSyncControllerTest extends WebTestCase $this->assertResponseStatusCodeSame(202); /** @var \Symfony\Component\Messenger\Transport\InMemory\InMemoryTransport $transport */ - $transport = self::getContainer()->get('messenger.transport.async'); + $transport = self::getContainer()->get(\Symfony\Component\Messenger\Transport\TransportInterface::class); $this->assertCount(1, $transport->getSent()); } diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php index bfd0731ee..20fa1f2ff 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php @@ -36,7 +36,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\AgentAggregator::class); } public function getAggregator(): AgentAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php index 7f688e28e..47f47462d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php @@ -36,7 +36,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\CancelReasonAggregator::class); } public function getAggregator(): CancelReasonAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php index 1a937c1a2..b343a0eac 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php @@ -36,7 +36,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\JobAggregator::class); } public function getAggregator(): JobAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php index 74b324b99..3eb022dd9 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php @@ -36,7 +36,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\LocationAggregator::class); } public function getAggregator(): LocationAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php index ca2ee36c4..8bc0953db 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php @@ -36,7 +36,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\LocationTypeAggregator::class); } public function getAggregator(): LocationTypeAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php index 5cf828996..92b22d941 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php @@ -36,7 +36,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\MonthYearAggregator::class); } public function getAggregator(): MonthYearAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php index 27112cb85..78dbc1a16 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php @@ -36,7 +36,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator'); + $this->aggregator = self::getContainer()->get(\Chill\CalendarBundle\Export\Aggregator\ScopeAggregator::class); } public function getAggregator(): ScopeAggregator diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php index 7c3bd6b52..b1abc886b 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php @@ -43,7 +43,7 @@ final class AgentFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::getContainer()->get('chill.calendar.export.agent_filter'); + $this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\AgentFilter::class); } public function getFilter(): AgentFilter diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php index d319f2d92..911e08f42 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php @@ -43,7 +43,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter'); + $this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\BetweenDatesFilter::class); } public function getFilter(): BetweenDatesFilter diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php index ef56e40bf..f1bd59810 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php @@ -44,7 +44,7 @@ final class JobFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::getContainer()->get('chill.calendar.export.job_filter'); + $this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\JobFilter::class); } public function getFilter(): JobFilter diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php index 1ffc0259c..a6b0deab7 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php @@ -44,7 +44,7 @@ final class ScopeFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::getContainer()->get('chill.calendar.export.scope_filter'); + $this->filter = self::getContainer()->get(\Chill\CalendarBundle\Export\Filter\ScopeFilter::class); } public function getFilter(): ScopeFilter diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php index da7c99f32..fc6599b34 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php @@ -40,6 +40,8 @@ class CustomFieldsGroupController extends AbstractController private readonly CustomFieldProvider $customFieldProvider, private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, + private readonly \Twig\Loader\FilesystemLoader $filesystemLoader, + private readonly \Symfony\Component\Form\FormFactoryInterface $formFactory, ) {} /** @@ -204,7 +206,7 @@ class CustomFieldsGroupController extends AbstractController $form->add('submit_render', SubmitType::class, ['label' => 'POST AND RENDER']); $form->handleRequest($request); - $this->get('twig.loader') + $this->filesystemLoader ->addPath( __DIR__.'/../Tests/Fixtures/App/app/Resources/views/', $namespace = 'test' @@ -297,7 +299,7 @@ class CustomFieldsGroupController extends AbstractController $customfield = new CustomField() ->setCustomFieldsGroup($customFieldsGroup); - $builder = $this->get('form.factory') + $builder = $this->formFactory ->createNamedBuilder('', FormType::class, $customfield, [ 'method' => 'GET', 'action' => $this->generateUrl('customfield_new'), diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php index 02972a791..1589d4192 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php @@ -40,7 +40,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase self::bootKernel(); $this->cfProvider = self::$kernel->getContainer() - ->get('chill.custom_field.provider'); + ->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class); $this->cfChoice = $this->cfProvider->getCustomFieldByType('choice'); } diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php index 045e48050..dfd3d8a77 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php @@ -35,10 +35,10 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\ self::bootKernel(); $this->customFieldNumber = self::$kernel->getContainer() - ->get('chill.custom_field.number'); + ->get(\Chill\CustomFieldsBundle\CustomFields\CustomFieldNumber::class); $this->formBuilder = self::$kernel->getContainer() - ->get('form.factory') + ->get(\Symfony\Component\Form\FormFactoryInterface::class) ->createBuilder('form', null, [ 'csrf_protection' => false, 'csrf_field_name' => '_token', @@ -48,7 +48,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\ $request->setLocale('fr'); self::$kernel->getContainer() - ->get('request_stack') + ->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request); } @@ -124,7 +124,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\ $cfGroup = new \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup() ->addCustomField($cf); - $form = self::$kernel->getContainer()->get('form.factory') + $form = self::$kernel->getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class) ->createBuilder(\Chill\CustomFieldsBundle\Form\Type\CustomFieldType::class, [], [ 'group' => $cfGroup, ]) @@ -149,7 +149,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\ $cfGroup = new \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup() ->addCustomField($cf); - $form = self::$kernel->getContainer()->get('form.factory') + $form = self::$kernel->getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class) ->createBuilder(\Chill\CustomFieldsBundle\Form\Type\CustomFieldType::class, [], [ 'group' => $cfGroup, ]) diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php index 6e1173c30..8e99df233 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php @@ -31,7 +31,7 @@ final class CustomFieldsTextTest extends WebTestCase { self::bootKernel(); $this->customFieldProvider = self::$kernel->getContainer() - ->get('chill.custom_field.provider'); + ->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class); } public function testCustomFieldsTextExists(): void diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php index 58243da55..b4cb18acc 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php @@ -34,7 +34,7 @@ final class PostTextIntegerExtensionTest extends KernelTestCase $container = self::$kernel->getContainer(); - $this->formBuilder = $container->get('form.factory') + $this->formBuilder = $container->get(\Symfony\Component\Form\FormFactoryInterface::class) ->createBuilder('form', null); } diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php index 3057f58d7..c4db502bb 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php @@ -34,7 +34,7 @@ final class PostTextNumberExtensionTest extends KernelTestCase $container = self::$kernel->getContainer(); - $this->formBuilder = $container->get('form.factory') + $this->formBuilder = $container->get(\Symfony\Component\Form\FormFactoryInterface::class) ->createBuilder('form', null); } diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php index 751dd7448..8d77f5a81 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php @@ -33,7 +33,7 @@ final class CustomFieldsHelperTest extends KernelTestCase $container = self::$kernel->getContainer(); - $this->cfHelper = $container->get('chill.custom_field.helper'); + $this->cfHelper = $container->get(\Chill\CustomFieldsBundle\Service\CustomFieldsHelper::class); $this->randomCFText = new CustomField() ->setSlug('my-slug') diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php index fa9a13089..e03d7c874 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php @@ -31,17 +31,17 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase { self::bootKernel(); $this->cfRendering = self::$kernel->getContainer() - ->get('chill.custom_field.twig.custom_fields_rendering'); + ->get(\Chill\CustomFieldsBundle\Templating\Twig\CustomFieldRenderingTwig::class); $this->cfProvider = self::$kernel->getContainer() - ->get('chill.custom_field.provider'); + ->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class); // set locale to fr $prophet = new \Prophecy\Prophet(); $request = $prophet->prophesize(); $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$kernel->getContainer()->get('request_stack') + self::$kernel->getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request->reveal()); } diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php index 49b1785be..9aae7c894 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php @@ -33,17 +33,17 @@ final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase { self::bootKernel(); $this->cfRendering = self::$kernel->getContainer() - ->get('chill.custom_field.twig.custom_fields_group_rendering'); + ->get(\Chill\CustomFieldsBundle\Templating\Twig\CustomFieldsGroupRenderingTwig::class); $this->cfProvider = self::$kernel->getContainer() - ->get('chill.custom_field.provider'); + ->get(\Chill\CustomFieldsBundle\Service\CustomFieldProvider::class); // set locale to fr $prophet = new \Prophecy\Prophet(); $request = $prophet->prophesize(); $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$kernel->getContainer()->get('request_stack') + self::$kernel->getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request->reveal()); } diff --git a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php index 7b3efc935..bf9879f1f 100644 --- a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php @@ -83,7 +83,7 @@ final class EventSearchTest extends WebTestCase $this->prophet = new \Prophecy\Prophet(); $this->entityManager = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $this->centerA = $this->entityManager ->getRepository(\Chill\MainBundle\Entity\Center::class) diff --git a/src/Bundle/ChillMainBundle/Controller/MenuController.php b/src/Bundle/ChillMainBundle/Controller/MenuController.php index 165abccb0..ed9e3cc4a 100644 --- a/src/Bundle/ChillMainBundle/Controller/MenuController.php +++ b/src/Bundle/ChillMainBundle/Controller/MenuController.php @@ -18,10 +18,13 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; */ class MenuController extends AbstractController { + public function __construct(private readonly \Chill\MainBundle\Routing\MenuComposer $menuComposer) + { + } public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = []): \Symfony\Component\HttpFoundation\Response { return $this->render($layout, [ - 'menu_composer' => $this->get('chill.main.menu_composer'), + 'menu_composer' => $this->menuComposer, 'menu' => $menu, 'args' => $args, 'activeRouteKey' => $activeRouteKey, diff --git a/src/Bundle/ChillMainBundle/Controller/SearchController.php b/src/Bundle/ChillMainBundle/Controller/SearchController.php index 046178c5e..76cb13137 100644 --- a/src/Bundle/ChillMainBundle/Controller/SearchController.php +++ b/src/Bundle/ChillMainBundle/Controller/SearchController.php @@ -22,6 +22,7 @@ use Chill\MainBundle\Search\UnknowSearchNameException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; @@ -32,7 +33,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class SearchController extends AbstractController { - public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {} + public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi, private readonly FormFactoryInterface $formFactory) {} #[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/search/advanced/{name}', name: 'chill_main_advanced_search')] public function advancedSearchAction(mixed $name, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response @@ -208,8 +209,7 @@ class SearchController extends AbstractController protected function createAdvancedSearchForm($name, array $data = []) { - $builder = $this - ->get('form.factory') + $builder = $this->formFactory ->createNamedBuilder( '', FormType::class, diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php index cf0f06651..33ed7e2f6 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php @@ -17,6 +17,7 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\QueryBuilder; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Symfony\Contracts\Translation\TranslatorInterface; /** * Helper to test filters. @@ -278,7 +279,7 @@ abstract class AbstractFilterTest extends KernelTestCase } $catalogue = static::$kernel->getContainer() - ->get('translator') + ->get(TranslatorInterface::class) ->getCatalogue(); } catch (\Exception $ex) { $this->markTestIncomplete( diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/UserNotificationFlagsPersistenceTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/UserNotificationFlagsPersistenceTest.php index eefcd22c3..cdae83749 100644 --- a/src/Bundle/ChillMainBundle/Tests/Entity/UserNotificationFlagsPersistenceTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Entity/UserNotificationFlagsPersistenceTest.php @@ -24,7 +24,7 @@ class UserNotificationFlagsPersistenceTest extends KernelTestCase public function testFlushPersistsNotificationFlagsChanges(): void { self::bootKernel(); - $em = self::getContainer()->get('doctrine')->getManager(); + $em = self::getContainer()->get(\Doctrine\Bundle\DoctrineBundle\Registry::class)->getManager(); $user = new User(); $user->setUsername('user_'.bin2hex(random_bytes(4))); diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index 51cf5696d..768fa09ea 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -347,8 +347,8 @@ final class ExportManagerTest extends KernelTestCase return new ExportManager( $logger ?? self::getContainer()->get(LoggerInterface::class), - $authorizationChecker ?? self::getContainer()->get('security.authorization_checker'), - $authorizationHelper ?? self::getContainer()->get('chill.main.security.authorization.helper'), + $authorizationChecker ?? self::getContainer()->get(\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::class), + $authorizationHelper ?? self::getContainer()->get(\Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface::class), $tokenStorage, $exports, $aggregators, diff --git a/src/Bundle/ChillMainBundle/Tests/Repository/NotificationRepositoryTest.php b/src/Bundle/ChillMainBundle/Tests/Repository/NotificationRepositoryTest.php index dfc1350fe..64a7fb3a6 100644 --- a/src/Bundle/ChillMainBundle/Tests/Repository/NotificationRepositoryTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Repository/NotificationRepositoryTest.php @@ -30,7 +30,7 @@ class NotificationRepositoryTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->entityManager = static::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + $this->entityManager = static::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class); $this->repository = new NotificationRepository($this->entityManager); } diff --git a/src/Bundle/ChillMainBundle/Tests/Repository/UserRepositoryTest.php b/src/Bundle/ChillMainBundle/Tests/Repository/UserRepositoryTest.php index 88919aa15..08e4d4faf 100644 --- a/src/Bundle/ChillMainBundle/Tests/Repository/UserRepositoryTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Repository/UserRepositoryTest.php @@ -26,7 +26,7 @@ class UserRepositoryTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $entityManager = static::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + $entityManager = static::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class); $connection = $entityManager->getConnection(); $this->userRepository = new UserRepository($entityManager, $connection); } diff --git a/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php b/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php index 2e57515f7..dfe785f8c 100644 --- a/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\MainBundle\Tests\Routing\Loader; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Symfony\Component\Routing\RouterInterface; /** * Test the route loader. @@ -27,7 +28,7 @@ final class RouteLoaderTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->router = self::$kernel->getContainer()->get('router'); + $this->router = self::$kernel->getContainer()->get(RouterInterface::class); } /** diff --git a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php index 6731fb809..1e77f9b3a 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php @@ -29,7 +29,7 @@ final class TokenManagerTest extends KernelTestCase self::bootKernel(); $logger = self::getContainer() - ->get('logger'); + ->get(LoggerInterface::class); $this->tokenManager = new TokenManager('secret', $logger); } diff --git a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php index 8e6366bec..9f75da76e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php @@ -37,7 +37,7 @@ final class MenuComposerTest extends KernelTestCase { self::bootKernel(['environment' => 'test']); $this->menuComposer = self::getContainer() - ->get('chill.main.menu_composer'); + ->get(\Chill\MainBundle\Routing\MenuComposer::class); } /** diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationToUserGroupsOnTransitionTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationToUserGroupsOnTransitionTest.php index 0c781d311..b0cb48408 100644 --- a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationToUserGroupsOnTransitionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/NotificationToUserGroupsOnTransitionTest.php @@ -53,9 +53,9 @@ class NotificationToUserGroupsOnTransitionTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->twig = self::getContainer()->get('twig'); + $this->twig = self::getContainer()->get(\Twig\Environment::class); $this->bodyRenderer = self::getContainer()->get(BodyRendererInterface::class); - $this->em = self::getContainer()->get('doctrine.orm.entity_manager'); + $this->em = self::getContainer()->get(\Doctrine\ORM\EntityManager::class); } public function testOnCompletedSendNotificationToUserGroupWithEmailAddress(): void diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php index 08592bf75..47c6f2201 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php @@ -55,7 +55,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase $maxResults = $maxGenerated * 8; self::bootKernel(); - $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + $em = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class); $qb = $em->createQueryBuilder(); $personIds = $qb @@ -101,7 +101,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase $period = self::getContainer()->get(AccompanyingPeriodRepository::class) ->find($periodId); - $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); + $em = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class); $violations = self::$validator->validate($period, null, ['confirmed']); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php index 85403cc74..72b262970 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php @@ -56,7 +56,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase { self::bootKernel(); self::$em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php index dd0de413b..44231ff54 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php @@ -46,7 +46,7 @@ final class PersonAddressControllerTest extends WebTestCase self::bootKernel(); $em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); @@ -69,7 +69,7 @@ final class PersonAddressControllerTest extends WebTestCase self::bootKernel(); $this->em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $this->postalCode = $this->em->getRepository(\Chill\MainBundle\Entity\PostalCode::class) ->findOneBy(['code' => 1000]); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php index 7968d56a0..04aaba842 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php @@ -49,7 +49,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase self::bootKernel(['environment' => 'test_with_hidden_fields']); $this->em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/WorkflowSignatureCancelControllerStepTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/WorkflowSignatureCancelControllerStepTest.php index 0f1d9154b..4ea6c3eeb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/WorkflowSignatureCancelControllerStepTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/WorkflowSignatureCancelControllerStepTest.php @@ -43,7 +43,7 @@ class WorkflowSignatureCancelControllerStepTest extends WebTestCase { self::bootKernel(); - $this->formFactory = self::getContainer()->get('form.factory'); + $this->formFactory = self::getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class); $this->signatureStepStateChanger = self::getContainer()->get(SignatureStepStateChanger::class); $this->chillUrlGenerator = self::getContainer()->get(ChillUrlGeneratorInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php index c7fab6720..4e46725c0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php @@ -29,7 +29,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_administrative_location'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\AdministrativeLocationAggregator::class); } public function getAggregator(): AdministrativeLocationAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php index 5ccfaa145..03f06a705 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php @@ -29,7 +29,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_closingmotive'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingMotiveAggregator::class); } public function getAggregator(): ClosingMotiveAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php index f2e7fcf7e..9b906171c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php @@ -29,7 +29,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_confidential'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ConfidentialAggregator::class); } public function getAggregator(): ConfidentialAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php index 951c75ba8..88af891b1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php @@ -29,7 +29,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_duration'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\DurationAggregator::class); } public function getAggregator(): DurationAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php index f64dbe0f4..df1d66119 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php @@ -29,7 +29,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_emergency'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EmergencyAggregator::class); } public function getAggregator(): EmergencyAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php index bea69d44b..8ff54cb00 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php @@ -29,7 +29,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluation'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EvaluationAggregator::class); } public function getAggregator(): EvaluationAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php index b5374da16..252a85807 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php @@ -31,7 +31,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_geographicalunitstat'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\GeographicalUnitStatAggregator::class); } public function getAggregator(): GeographicalUnitStatAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php index 4b3f0a154..fd2f8d3c9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php @@ -29,7 +29,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_intensity'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\IntensityAggregator::class); } public function getAggregator(): IntensityAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php index e76f1610a..d68e056f0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php @@ -29,7 +29,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_origin'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\OriginAggregator::class); } public function getAggregator(): OriginAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php index d89e0ea2a..9774dd1de 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php @@ -30,7 +30,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerAggregator::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php index 6b3f90261..202bfba3d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php @@ -29,7 +29,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_requestor'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\RequestorAggregator::class); } public function getAggregator(): RequestorAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php index 142c05010..3ee537099 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php @@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_scope'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator::class); } public function getAggregator(): ScopeAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php index dd97943b1..aebd867a5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php @@ -29,7 +29,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialaction'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialActionAggregator::class); } public function getAggregator(): SocialActionAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php index 0e66f0cb5..62f62fe18 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php @@ -29,7 +29,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialissue'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialIssueAggregator::class); } public function getAggregator(): SocialIssueAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php index d5e489472..e8343eae9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php @@ -30,7 +30,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_step'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\StepAggregator::class); } public function getAggregator(): StepAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php index 7b0996c3c..71f26d504 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php @@ -30,7 +30,7 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_job'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\UserJobAggregator::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php index 4d1f7e6c5..4d8acf9fc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php @@ -29,7 +29,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluationtype'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\EvaluationAggregators\EvaluationTypeAggregator::class); } public function getAggregator(): EvaluationTypeAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php index c6d40b5c4..93184a2e3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php @@ -30,7 +30,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_childrennumber'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\ChildrenNumberAggregator::class); } public function getAggregator(): ChildrenNumberAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php index 9410cd605..1896c2b51 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php @@ -30,7 +30,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_composition'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\CompositionAggregator::class); } public function getAggregator(): CompositionAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php index 79d0efd17..51e34c179 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php @@ -30,7 +30,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_age'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\AgeAggregator::class); } public function getAggregator(): AgeAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php index 2312dc336..2fb5e7dde 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php @@ -29,7 +29,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_country_of_birth'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\CountryOfBirthAggregator::class); } public function getAggregator(): CountryOfBirthAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php index 1b50be5a1..f14106d42 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php @@ -29,7 +29,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_gender'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\GenderAggregator::class); } public function getAggregator(): GenderAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php index 8357268b9..8c5348704 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php @@ -32,7 +32,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_position'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\HouseholdPositionAggregator::class); } public function getAggregator(): HouseholdPositionAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php index 12d37a5d2..c2b44da3e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php @@ -29,7 +29,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_marital_status'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\MaritalStatusAggregator::class); } public function getAggregator(): MaritalStatusAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php index dc6797562..14abc10d1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php @@ -29,7 +29,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_nationality'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\NationalityAggregator::class); } public function getAggregator(): NationalityAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php index 770628462..40d2aba84 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php @@ -29,7 +29,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_action_type'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ActionTypeAggregator::class); } public function getAggregator(): ActionTypeAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php index 960520b2d..669478160 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php @@ -29,7 +29,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goal'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalAggregator::class); } public function getAggregator(): GoalAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php index 1bba9cc9e..4f8659736 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php @@ -29,7 +29,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goalresult'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalResultAggregator::class); } public function getAggregator(): GoalResultAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php index 8fb60eb51..ef3471f6f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php @@ -29,7 +29,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_job'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\JobAggregator::class); } public function getAggregator(): JobAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php index 78b05a2fe..17be633ba 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php @@ -29,7 +29,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_result'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ResultAggregator::class); } public function getAggregator(): ResultAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php index 4f38bda63..6b8acae17 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php @@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_scope'); + $this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ScopeAggregator::class); } public function getAggregator(): ScopeAggregator diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php index 9c0eb538c..ea85f0625 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php @@ -43,7 +43,7 @@ final class ListPersonTest extends AbstractExportTest $request->getLocale()->willReturn('fr'); - self::getContainer()->get('request_stack') + self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class) ->push($request->reveal()); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php index f62cd2be4..7ee1bb5c8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php @@ -31,7 +31,7 @@ final class StatAccompanyingCourseDurationTest extends AbstractExportTest { self::bootKernel(); - $this->export = self::getContainer()->get('chill.person.export.avg_accompanyingcourse_duration'); + $this->export = self::getContainer()->get(\Chill\PersonBundle\Export\Export\StatAccompanyingCourseDuration::class); } public function getExport() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php index 924280519..5ae8ee4b3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php @@ -30,7 +30,7 @@ final class ActiveOnDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_activeondate'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOnDateFilter::class); } public function getFilter(): ActiveOnDateFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php index d6251da6d..d73338267 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php @@ -30,7 +30,7 @@ final class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_activeonedaybetweendates'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOneDayBetweenDatesFilter::class); } public function getFilter(): ActiveOneDayBetweenDatesFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php index 3136d6e62..ba142ff44 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php @@ -29,7 +29,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_administrative_location'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\AdministrativeLocationFilter::class); } public function getFilter(): AdministrativeLocationFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php index efc11d6c8..cdce957b0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php @@ -30,7 +30,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_closingmotive'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ClosingMotiveFilter::class); } public function getFilter(): ClosingMotiveFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php index 6f94d9571..76bd4eeac 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php @@ -28,7 +28,7 @@ final class ConfidentialFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_confidential'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ConfidentialFilter::class); } public function getFilter(): ConfidentialFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php index cbc296f62..6490cdb5b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php @@ -28,7 +28,7 @@ final class EmergencyFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_emergency'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EmergencyFilter::class); } public function getFilter(): EmergencyFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php index b4ea79e00..8fdbf6150 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php @@ -29,7 +29,7 @@ final class EvaluationFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_evaluation'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EvaluationFilter::class); } public function getFilter(): EvaluationFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php index b6bcbcd53..fc14f45ea 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php @@ -31,7 +31,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_geographicalunitstat'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\GeographicalUnitStatFilter::class); } public function getFilter(): GeographicalUnitStatFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php index 7daffc6c0..89412f719 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php @@ -29,7 +29,7 @@ final class IntensityFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_intensity'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\IntensityFilter::class); } public function getFilter(): IntensityFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php index 6bab1a4e0..99a2098a7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php @@ -30,7 +30,7 @@ final class OpenBetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_openbetweendates'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OpenBetweenDatesFilter::class); } public function getFilter(): OpenBetweenDatesFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php index d7219c191..e8bd71fb6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php @@ -30,7 +30,7 @@ final class OriginFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_origin'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OriginFilter::class); } public function getFilter(): OriginFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php index 8dd471ee5..019c5b6e1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php @@ -29,7 +29,7 @@ final class RequestorFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_requestor'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\RequestorFilter::class); } public function getFilter(): RequestorFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php index 3c83230ef..f7771a3f9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php @@ -31,7 +31,7 @@ final class SocialActionFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_socialaction'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialActionFilter::class); } public function getFilter(): SocialActionFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php index c7d5a0405..9a4affc3e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php @@ -31,7 +31,7 @@ final class SocialIssueFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_socialissue'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialIssueFilter::class); } public function getFilter(): SocialIssueFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php index 2fee4cb22..6e755a14e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php @@ -30,7 +30,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_evaluationtype'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\EvaluationFilters\EvaluationTypeFilter::class); } public function getFilter(): EvaluationTypeFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php index 5c93d6f93..dbea286d5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php @@ -29,7 +29,7 @@ final class MaxDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_maxdate'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\EvaluationFilters\MaxDateFilter::class); } public function getFilter(): MaxDateFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php index d3ab4e2de..75d6384b8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php @@ -31,7 +31,7 @@ final class CompositionFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_household_composition'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\HouseholdFilters\CompositionFilter::class); } public function getFilter(): CompositionFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php index 3021a1573..a59c5f7d4 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php @@ -30,7 +30,7 @@ final class AgeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_age'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\AgeFilter::class); } public function getFilter(): AgeFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php index a88989d9b..983fffd7f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php @@ -30,7 +30,7 @@ final class BirthdateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_birthdate'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\BirthdateFilter::class); } public function getFilter(): BirthdateFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php index f5e26a7b8..bd3bd6041 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php @@ -30,7 +30,7 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_dead_or_alive'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\DeadOrAliveFilter::class); } public function getFilter(): DeadOrAliveFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php index 3f99bcac8..425033cdc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php @@ -30,7 +30,7 @@ final class DeathdateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_deathdate'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\DeathdateFilter::class); } public function getFilter(): DeathdateFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php index e0c1c3066..2dee81ed6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php @@ -29,7 +29,7 @@ final class GenderFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_gender'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\GenderFilter::class); } public function getFilter(): GenderFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php index 0a22f696d..571dca13c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php @@ -30,7 +30,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_marital_status'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\MaritalStatusFilter::class); } public function getFilter(): MaritalStatusFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php index 060fdb5e8..9496d1f2c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php @@ -30,7 +30,7 @@ final class NationalityFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_nationality'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\NationalityFilter::class); } public function getFilter(): NationalityFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php index d96ccd93c..fabd743ce 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php @@ -33,7 +33,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_thirdparty'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtThirdpartyFilter::class); } public function getFilter(): ResidentialAddressAtThirdpartyFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php index 3a711320e..e7ef4e9e7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php @@ -31,7 +31,7 @@ final class ResidentialAddressAtUserFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_user'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtUserFilter::class); } public function getFilter(): ResidentialAddressAtUserFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php index c9dcda6c1..d630e0890 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php @@ -31,7 +31,7 @@ final class JobFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_job'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\SocialWorkFilters\JobFilter::class); } public function getFilter(): JobFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php index 986c4610d..5ddefc606 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php @@ -31,7 +31,7 @@ final class ReferrerFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_treatingagent'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\SocialWorkFilters\ReferrerFilter::class); } public function getFilter(): ReferrerFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php index 83cd07747..ad4fd94bb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php @@ -30,7 +30,7 @@ final class ScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::getContainer()->get('chill.person.export.filter_scope'); + $this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\SocialWorkFilters\ScopeFilter::class); } public function getFilter(): ScopeFilter diff --git a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php index 35e823041..3009f0722 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Tests\Form\Type; use Chill\PersonBundle\Form\Type\PickPersonType; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; /** @@ -36,14 +37,14 @@ final class PickPersonTypeTest extends KernelTestCase { self::bootKernel(); - $this->user = self::getContainer()->get('doctrine.orm.entity_manager') + $this->user = self::getContainer()->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'multi_center']); - $this->formFactory = self::getContainer()->get('form.factory'); + $this->formFactory = self::getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class); $token = (new UsernamePasswordToken($this->user, 'password', 'firewall')); - self::getContainer()->get('security.token_storage') + self::getContainer()->get(TokenStorageInterface::class) ->setToken($token); } @@ -69,7 +70,7 @@ final class PickPersonTypeTest extends KernelTestCase public function testWithOptionCenter(): void { $this->markTestSkipped('need to inject locale into url generator without request'); - $center = self::getContainer()->get('doctrine.orm.entity_manager') + $center = self::getContainer()->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); @@ -102,7 +103,7 @@ final class PickPersonTypeTest extends KernelTestCase public function testWithOptionCenters(): void { $this->markTestSkipped('need to inject locale into url generator without request'); - $centers = self::getContainer()->get('doctrine.orm.entity_manager') + $centers = self::getContainer()->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findAll(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php index 8672f10e7..dcc0bec04 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php @@ -49,7 +49,7 @@ final class PersonVoterTest extends KernelTestCase { self::bootKernel(); $this->voter = self::getContainer() - ->get('chill.person.security.authorization.person'); + ->get(\Chill\PersonBundle\Security\Authorization\PersonVoter::class); $this->prophet = new \Prophecy\Prophet(); } diff --git a/src/Bundle/ChillReportBundle/Controller/ReportController.php b/src/Bundle/ChillReportBundle/Controller/ReportController.php index 0548a0771..64e12cf22 100644 --- a/src/Bundle/ChillReportBundle/Controller/ReportController.php +++ b/src/Bundle/ChillReportBundle/Controller/ReportController.php @@ -24,6 +24,7 @@ use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Contracts\Translation\TranslatorInterface; /** @@ -35,11 +36,13 @@ class ReportController extends AbstractController * ReportController constructor. */ public function __construct( - private readonly EventDispatcherInterface $eventDispatcher, - private readonly AuthorizationHelper $authorizationHelper, - private readonly PaginatorFactory $paginator, - private readonly TranslatorInterface $translator, + private readonly EventDispatcherInterface $eventDispatcher, + private readonly AuthorizationHelper $authorizationHelper, + private readonly PaginatorFactory $paginator, + private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, + private readonly TokenStorage $tokenStorage, + private readonly \Symfony\Component\Form\FormFactoryInterface $formFactory, ) {} /** @@ -250,7 +253,7 @@ class ReportController extends AbstractController } $entity = new Report(); - $entity->setUser($this->get('security.token_storage')->getToken()->getUser()); + $entity->setUser($this->tokenStorage->getToken()->getUser()); $entity->setDate(new \DateTime('now')); $entity->setCFGroup($cFGroup); @@ -308,7 +311,7 @@ class ReportController extends AbstractController $cFGroupsChoice[$cFGroup->getId()] = $cFGroup->getName($request->getLocale()); } - $form = $this->get('form.factory') + $form = $this->formFactory ->createNamedBuilder(null, FormType::class, null, [ 'method' => 'GET', 'csrf_protection' => false, @@ -355,7 +358,7 @@ class ReportController extends AbstractController $cFGroupsChoice[$cFGroup->getId()] = $cFGroup->getName($request->getLocale()); } - $form = $this->get('form.factory') + $form = $this->formFactory ->createNamedBuilder(null, FormType::class, null, [ 'method' => 'GET', 'csrf_protection' => false, diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php index afc58e4e8..790c25abd 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php @@ -40,7 +40,7 @@ final class ReportControllerNextTest extends WebTestCase self::bootKernel(); // get person from fixture $em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $this->person = $em ->getRepository(Person::class) @@ -57,7 +57,7 @@ final class ReportControllerNextTest extends WebTestCase // get custom fields group from fixture $customFieldsGroups = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(CustomFieldsGroup::class) ->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]); // filter customFieldsGroup to get only "situation de logement" @@ -87,7 +87,7 @@ final class ReportControllerNextTest extends WebTestCase public function testUngrantedUserIsDeniedAccessOnReport(): void { $client = $this->getAuthenticatedClient('center b_social'); - $reports = self::$kernel->getContainer()->get('doctrine.orm.entity_manager') + $reports = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class) ->getRepository('ChillReportBundle:Report') ->findBy(['person' => $this->person]); $report = $reports[0]; diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php index a857522d5..d6b7b70af 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php @@ -54,11 +54,11 @@ final class ReportControllerTest extends WebTestCase self::bootKernel(); self::$em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); // get a random person self::$person = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(Person::class) ->findOneBy( [ @@ -72,7 +72,7 @@ final class ReportControllerTest extends WebTestCase } $customFieldsGroups = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(CustomFieldsGroup::class) ->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]); // filter customFieldsGroup to get only "situation de logement" @@ -83,7 +83,7 @@ final class ReportControllerTest extends WebTestCase self::$group = $filteredCustomFieldsGroupHouse[0]; self::$user = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'center a_social']); } @@ -337,7 +337,7 @@ final class ReportControllerTest extends WebTestCase )); $this->assertEquals(new \DateTime('yesterday'), self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager') + ->get(\Doctrine\ORM\EntityManager::class) ->getRepository('ChillReportBundle:Report') ->find($reportId) ->getDate()); diff --git a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php index 9d6ab357c..83c757506 100644 --- a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php @@ -50,7 +50,7 @@ final class ReportVoterTest extends KernelTestCase { self::bootKernel(); $this->voter = self::$kernel->getContainer() - ->get('chill.report.security.authorization.report_voter'); + ->get(\Chill\ReportBundle\Security\Authorization\ReportVoter::class); $this->prophet = new \Prophecy\Prophet(); } diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php index d5f589c95..3eb1fbedd 100644 --- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php @@ -43,7 +43,7 @@ final class TimelineProviderTest extends WebTestCase self::bootKernel(); self::$em = self::$kernel->getContainer() - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $center = self::$em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); diff --git a/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php b/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php index b649606d9..760664f11 100644 --- a/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php +++ b/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php @@ -81,7 +81,7 @@ final class SingleTaskControllerTest extends WebTestCase { $container = self::getContainer(); $em = $container - ->get('doctrine.orm.entity_manager'); + ->get(\Doctrine\ORM\EntityManager::class); $centers = $em ->getRepository(Center::class)