diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php index febf3b820..55b2fb8c0 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php @@ -221,7 +221,7 @@ final class ActivityControllerTest extends WebTestCase } //create groupCenter $groupCenter = new \Chill\MainBundle\Entity\GroupCenter(); - $groupCenter->setCenter($em->getRepository('ChillMainBundle:Center') + $groupCenter->setCenter($em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A'])) ->setPermissionsGroup($withoutActivityPermissionGroup); $em->persist($withoutActivityPermissionGroup); @@ -249,7 +249,7 @@ final class ActivityControllerTest extends WebTestCase $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $activities = $em->getRepository('ChillActivityBundle:Activity') + $activities = $em->getRepository(\Chill\ActivityBundle\Entity\Activity::class) ->findBy(['person' => $person]); if (count($activities) === 0) { @@ -281,7 +281,7 @@ final class ActivityControllerTest extends WebTestCase $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $person = $em->getRepository('ChillPersonBundle:Person') + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy([ 'firstName' => 'Depardieu', 'lastName' => 'Gérard', @@ -339,7 +339,7 @@ final class ActivityControllerTest extends WebTestCase { $user = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneByUsername($username); if (null === $user) { @@ -349,7 +349,7 @@ final class ActivityControllerTest extends WebTestCase $center = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:Center') + ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneByName($centerName); // get scope reachable by both role UPDATE and DELETE diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php index 15842e729..0a6518018 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php @@ -68,10 +68,10 @@ final class ActivityTypeTest extends KernelTestCase ->push($request); $this->user = $this->container->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'center a_social']); $this->center = $this->container->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:Center') + ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $token = $prophet->prophesize(); $token->willExtend(AbstractToken::class); diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php index dae04ec12..a07d36ee1 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventController.php @@ -178,7 +178,7 @@ class EventController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository('ChillPersonBundle:Person')->find($person_id); + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); if (null === $person) { throw $this->createNotFoundException('Person not found'); diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php index 1ef545616..52fe3d867 100644 --- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php +++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php @@ -598,7 +598,7 @@ class ParticipationController extends AbstractController $participation = count($persons_ids) > 1 ? clone $participation : $participation; if (null !== $person_id) { - $person = $em->getRepository('ChillPersonBundle:Person') + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { diff --git a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php index 104a12dbb..925a61495 100644 --- a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php +++ b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php @@ -15,6 +15,7 @@ use Chill\EventBundle\Entity\Event; use Chill\EventBundle\Entity\Participation; use Chill\MainBundle\DataFixtures\ORM\LoadScopes; use Chill\MainBundle\Entity\Center; +use Chill\PersonBundle\Entity\Person; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Persistence\ObjectManager; @@ -64,11 +65,11 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa public function load(ObjectManager $manager) { - $centers = $manager->getRepository('ChillMainBundle:Center') + $centers = $manager->getRepository(Center::class) ->findAll(); foreach ($centers as $center) { - $people = $manager->getRepository('ChillPersonBundle:Person') + $people = $manager->getRepository(Person::class) ->findBy(['center' => $center]); $events = $this->createEvents($center, $manager); diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php index 9cd9243b3..aa14cf748 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php @@ -453,7 +453,7 @@ final class ParticipationControllerTest extends WebTestCase */ protected function getRandomEvent($centerName = 'Center A', $circleName = 'social') { - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findByName($centerName); $circles = $this->em->getRepository('ChillMainBundle:Scope') @@ -503,10 +503,10 @@ final class ParticipationControllerTest extends WebTestCase */ protected function getRandomPerson($centerName = 'Center A') { - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findByName($centerName); - $persons = $this->em->getRepository('ChillPersonBundle:Person') + $persons = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findBy(['center' => $center]); $person = $persons[array_rand($persons)]; diff --git a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php index 30479b1a4..837fbcade 100644 --- a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php @@ -86,7 +86,7 @@ final class EventSearchTest extends WebTestCase ->get('doctrine.orm.entity_manager'); $this->centerA = $this->entityManager - ->getRepository('ChillMainBundle:Center') + ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->eventType = $this->entityManager diff --git a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php index d61aed91c..07e514e6d 100644 --- a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php +++ b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php @@ -43,7 +43,7 @@ class SetPasswordCommand extends Command public function _getUser($username) { return $this->entityManager - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => $username]); } diff --git a/src/Bundle/ChillMainBundle/Controller/CenterController.php b/src/Bundle/ChillMainBundle/Controller/CenterController.php index fbdca566b..729f2b243 100644 --- a/src/Bundle/ChillMainBundle/Controller/CenterController.php +++ b/src/Bundle/ChillMainBundle/Controller/CenterController.php @@ -54,7 +54,7 @@ class CenterController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $center = $em->getRepository('ChillMainBundle:Center')->find($id); + $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id); if (!$center) { throw $this->createNotFoundException('Unable to find Center entity.'); @@ -75,7 +75,7 @@ class CenterController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository('ChillMainBundle:Center')->findAll(); + $entities = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->findAll(); return $this->render('@ChillMain/Center/index.html.twig', [ 'entities' => $entities, @@ -105,7 +105,7 @@ class CenterController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $center = $em->getRepository('ChillMainBundle:Center')->find($id); + $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id); if (!$center) { throw $this->createNotFoundException('Unable to find Center entity.'); @@ -125,7 +125,7 @@ class CenterController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $center = $em->getRepository('ChillMainBundle:Center')->find($id); + $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id); if (!$center) { throw $this->createNotFoundException('Unable to find Center entity.'); diff --git a/src/Bundle/ChillMainBundle/Controller/UserController.php b/src/Bundle/ChillMainBundle/Controller/UserController.php index 5b72115b8..01e7ece26 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserController.php @@ -61,7 +61,7 @@ class UserController extends CRUDController { $em = $this->getDoctrine()->getManager(); - $user = $em->getRepository('ChillMainBundle:User')->find($uid); + $user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid); if (!$user) { throw $this->createNotFoundException('Unable to find User entity.'); @@ -118,7 +118,7 @@ class UserController extends CRUDController { $em = $this->getDoctrine()->getManager(); - $user = $em->getRepository('ChillMainBundle:User')->find($uid); + $user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid); if (!$user) { throw $this->createNotFoundException('Unable to find User entity.'); diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php index 18a3f6c66..b4264140b 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php @@ -83,7 +83,7 @@ abstract class AbstractExportTest extends WebTestCase $em = static::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $centers = $em->getRepository('ChillMainBundle:Center') + $centers = $em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findAll(); $circles = $em->getRepository('ChillMainBundle:Scope') ->findAll(); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php index 42f541d56..c7c916f8b 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php @@ -161,7 +161,7 @@ final class UserControllerTest extends WebTestCase $user = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => $username]); $this->assertTrue($passwordEncoder->isPasswordValid($user, $password)); diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index 82693b9c1..87508dfbf 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -672,7 +672,7 @@ final class ExportManagerTest extends KernelTestCase $localUser = $user ?? self::$container->get( 'doctrine.orm.entity_manager' ) - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'center a_social']); $token = new UsernamePasswordToken($localUser, 'password', 'provider'); $tokenStorage = new TokenStorage(); diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php index c34702ad1..2a9c43da7 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php @@ -451,7 +451,7 @@ class AccompanyingPeriodController extends AbstractController private function _getPerson(int $id): Person { $person = $this->getDoctrine()->getManager() - ->getRepository('ChillPersonBundle:Person')->find($id); + ->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($id); if (null === $person) { throw $this->createNotFoundException('Person not found'); diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php index 2d4a60c15..d4c5b334d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php @@ -43,7 +43,7 @@ class PersonAddressController extends AbstractController public function createAction($person_id, Request $request) { $person = $this->getDoctrine()->getManager() - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { @@ -98,7 +98,7 @@ class PersonAddressController extends AbstractController public function editAction($person_id, $address_id) { $person = $this->getDoctrine()->getManager() - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { @@ -126,7 +126,7 @@ class PersonAddressController extends AbstractController public function listAction($person_id) { $person = $this->getDoctrine()->getManager() - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { @@ -148,7 +148,7 @@ class PersonAddressController extends AbstractController public function newAction($person_id) { $person = $this->getDoctrine()->getManager() - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { @@ -175,7 +175,7 @@ class PersonAddressController extends AbstractController public function updateAction($person_id, $address_id, Request $request) { $person = $this->getDoctrine()->getManager() - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { diff --git a/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php b/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php index 5e7ed4043..1db70bce5 100644 --- a/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php +++ b/src/Bundle/ChillPersonBundle/Form/DataTransformer/PersonToIdTransformer.php @@ -44,7 +44,7 @@ class PersonToIdTransformer implements DataTransformerInterface } $issue = $this->om - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy(['id' => $id]); if (null === $issue) { diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php index fd674f53b..98fa0ab2d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php @@ -71,7 +71,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase 'PHP_AUTH_PW' => 'password', ]); - $center = self::$em->getRepository('ChillMainBundle:Center') + $center = self::$em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->person = (new Person(new DateTime('2015-01-05'))) diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php index 391fad165..7691e9b49 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php @@ -47,7 +47,7 @@ final class PersonAddressControllerTest extends WebTestCase $em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = $em->getRepository('ChillMainBundle:Center') + $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); self::$person = (new Person()) @@ -195,7 +195,7 @@ final class PersonAddressControllerTest extends WebTestCase */ protected function refreshPerson() { - self::$person = $this->em->getRepository('ChillPersonBundle:Person') + self::$person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find(self::$person->getId()); } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index b7513d0dc..11f1ee43d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -51,14 +51,14 @@ final class PersonControllerCreateTest extends WebTestCase $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); //remove two people created during test - $jesus = $em->getRepository('ChillPersonBundle:Person') + $jesus = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy(['firstName' => 'God']); if (null !== $jesus) { $em->remove($jesus); } - $jesus2 = $em->getRepository('ChillPersonBundle:Person') + $jesus2 = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy(['firstName' => 'roger']); if (null !== $jesus2) { diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php index c85b8d058..bb582232e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php @@ -58,7 +58,7 @@ final class PersonControllerUpdateTest extends WebTestCase $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->person = (new Person()) @@ -317,7 +317,7 @@ final class PersonControllerUpdateTest extends WebTestCase */ protected function refreshPerson() { - $this->person = $this->em->getRepository('ChillPersonBundle:Person') + $this->person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($this->person->getId()); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php index ac655d8ce..934eddc34 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php @@ -57,7 +57,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->person = (new Person()) @@ -211,7 +211,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase */ protected function refreshPerson() { - $this->person = $this->em->getRepository('ChillPersonBundle:Person') + $this->person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($this->person->getId()); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php index 5a3ecd28f..2a5b4c6b1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php @@ -42,7 +42,7 @@ final class PersonControllerViewTest extends WebTestCase $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->person = (new Person()) @@ -113,7 +113,7 @@ final class PersonControllerViewTest extends WebTestCase */ protected function refreshPerson() { - $this->person = $this->em->getRepository('ChillPersonBundle:Person') + $this->person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($this->person->getId()); } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php index 602dd41e8..6526745a2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php @@ -42,7 +42,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase $this->em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->person = (new Person()) @@ -99,7 +99,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase */ protected function refreshPerson() { - $this->person = $this->em->getRepository('ChillPersonBundle:Person') + $this->person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($this->person->getId()); } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php index 3ebb63990..7f01d3c4b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php @@ -27,7 +27,7 @@ final class PersonDuplicateControllerViewTest extends WebTestCase $this->em = self::$container ->get('doctrine.orm.entity_manager'); - $center = $this->em->getRepository('ChillMainBundle:Center') + $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $this->person = (new Person()) diff --git a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php index 6a9e37531..c92de01c6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php @@ -38,7 +38,7 @@ final class PickPersonTypeTest extends KernelTestCase self::bootKernel(); $this->user = self::$container->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'multi_center']); $this->formFactory = self::$container->get('form.factory'); @@ -71,7 +71,7 @@ final class PickPersonTypeTest extends KernelTestCase { $this->markTestSkipped('need to inject locale into url generator without request'); $center = self::$container->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:Center') + ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $form = $this->formFactory @@ -104,7 +104,7 @@ final class PickPersonTypeTest extends KernelTestCase { $this->markTestSkipped('need to inject locale into url generator without request'); $centers = self::$container->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:Center') + ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findAll(); $form = $this->formFactory diff --git a/src/Bundle/ChillReportBundle/Controller/ReportController.php b/src/Bundle/ChillReportBundle/Controller/ReportController.php index 33ddd3a39..7f19b3434 100644 --- a/src/Bundle/ChillReportBundle/Controller/ReportController.php +++ b/src/Bundle/ChillReportBundle/Controller/ReportController.php @@ -78,7 +78,7 @@ class ReportController extends AbstractController $cFGroup = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup') ->find($cf_group_id); - $person = $em->getRepository('ChillPersonBundle:Person') + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person || null === $cFGroup) { @@ -212,7 +212,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository('ChillPersonBundle:Person')->find($person_id); + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); @@ -269,7 +269,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository('ChillPersonBundle:Person')->find($person_id); + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); $cFGroup = $em ->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup') ->find($cf_group_id); @@ -317,7 +317,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository('ChillPersonBundle:Person') + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) ->find($person_id); if (null === $person) { @@ -371,7 +371,7 @@ class ReportController extends AbstractController ]) ->getForm(); - $person = $em->getRepository('ChillPersonBundle:Person')->find($person_id); + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); return $this->render('ChillReportBundle:Report:select_report_type.html.twig', [ 'form' => $form->createView(), @@ -513,7 +513,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository('ChillPersonBundle:Person')->find($person_id); + $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); $entity = $em->getRepository('ChillReportBundle:Report')->find($report_id); diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php index 92984406c..f80645bc5 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php @@ -46,7 +46,7 @@ final class ReportControllerNextTest extends WebTestCase ->get('doctrine.orm.entity_manager'); $this->person = $em - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy( [ 'lastName' => 'Charline', diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php index dfbf18503..70516c5be 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php @@ -65,7 +65,7 @@ final class ReportControllerTest extends WebTestCase //get a random person self::$person = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository('ChillPersonBundle:Person') + ->getRepository(\Chill\PersonBundle\Entity\Person::class) ->findOneBy( [ 'lastName' => 'Charline', @@ -94,7 +94,7 @@ final class ReportControllerTest extends WebTestCase self::$user = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository('ChillMainBundle:User') + ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'center a_social']); } diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php index 647c1ae96..1e6e5f946 100644 --- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php @@ -52,7 +52,7 @@ final class TimelineProviderTest extends WebTestCase self::$em = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager'); - $center = self::$em->getRepository('ChillMainBundle:Center') + $center = self::$em->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); $person = (new Person(new DateTime('2015-05-01'))) @@ -71,7 +71,7 @@ final class TimelineProviderTest extends WebTestCase ); $report = (new Report()) - ->setUser(self::$em->getRepository('ChillMainBundle:User') + ->setUser(self::$em->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneByUsername('center a_social')) ->setDate(new DateTime('2015-05-02')) ->setPerson($this->person)