refactor: Upgrade repositories.

This commit is contained in:
Pol Dellaiera
2021-05-11 20:52:01 +02:00
parent ed4f1344c2
commit ce854cb58f
18 changed files with 156 additions and 96 deletions

View File

@@ -23,8 +23,8 @@
namespace Chill\PersonBundle\Repository;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
/**
* @method AccompanyingPeriodParticipation|null find($id, $lockMode = null, $lockVersion = null)
@@ -32,11 +32,12 @@ use Doctrine\Persistence\ManagerRegistry;
* @method AccompanyingPeriodParticipation[] findAll()
* @method AccompanyingPeriodParticipation[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class AccompanyingPeriodParticipationRepository extends ServiceEntityRepository
final class AccompanyingPeriodParticipationRepository
{
public function __construct(ManagerRegistry $registry)
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{
parent::__construct($registry, AccompanyingPeriodParticipation::class);
$this->repository = $entityManager->getRepository(AccompanyingPeriodParticipation::class);
}
}