Skip to content

Commit 93838e0

Browse files
Merge pull request #53 from cleverage/52
#52 Fix ProcessScheduleRepository definition to be bundled compliant
2 parents 91731c5 + 19344f2 commit 93838e0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

config/services/repository.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ services:
99
class: CleverAge\UiProcessBundle\Repository\ProcessScheduleRepository
1010
public: false
1111
arguments:
12-
- '@doctrine'
13-
12+
- '@doctrine.orm.entity_manager'

src/Repository/ProcessScheduleRepository.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
namespace CleverAge\UiProcessBundle\Repository;
1515

1616
use CleverAge\UiProcessBundle\Entity\ProcessSchedule;
17-
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
18-
use Doctrine\Persistence\ManagerRegistry;
17+
use Doctrine\ORM\EntityManagerInterface;
18+
use Doctrine\ORM\EntityRepository;
1919

2020
/**
21-
* @extends ServiceEntityRepository<ProcessSchedule>
21+
* @extends EntityRepository<ProcessSchedule>
2222
*
2323
* @method ProcessSchedule|null find($id, $lockMode = null, $lockVersion = null)
2424
* @method ProcessSchedule|null findOneBy(mixed[] $criteria, string[] $orderBy = null)
2525
* @method ProcessSchedule[] findAll()
2626
* @method ProcessSchedule[] findBy(mixed[] $criteria, string[] $orderBy = null, $limit = null, $offset = null)
2727
*/
28-
class ProcessScheduleRepository extends ServiceEntityRepository
28+
class ProcessScheduleRepository extends EntityRepository
2929
{
30-
public function __construct(ManagerRegistry $registry)
30+
public function __construct(EntityManagerInterface $em)
3131
{
32-
parent::__construct($registry, ProcessSchedule::class);
32+
parent::__construct($em, $em->getClassMetadata(ProcessSchedule::class));
3333
}
3434
}

0 commit comments

Comments
 (0)