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

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

View File

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

View File

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

View File

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

View File

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

View File

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