replace some entity shortcut by fqdn

* ChillPerson:Person
* ChillMain:Center
* ChillActivity:Activity
This commit is contained in:
2022-04-30 00:20:18 +02:00
parent 8ba51bafd0
commit a0392b9216
29 changed files with 61 additions and 60 deletions

View File

@@ -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');

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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)];

View File

@@ -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