Skip to content

Commit

Permalink
Merge pull request #1283 from VincentLanglet/patch-1
Browse files Browse the repository at this point in the history
Propagate template from EntityRepository
  • Loading branch information
greg0ire authored Jan 27, 2021
2 parents 3a88af2 + 38b7bd1 commit 91f0139
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Repository/ServiceEntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@
* parent::__construct($registry, YourEntity::class);
* }
* }
*
* @template T
* @template-extends EntityRepository<T>
*/
class ServiceEntityRepository extends EntityRepository implements ServiceEntityRepositoryInterface
{
/**
* @param string $entityClass The class name of the entity this repository manages
*
* @psalm-param class-string<T> $entityClass
*/
public function __construct(ManagerRegistry $registry, string $entityClass)
{
Expand Down

0 comments on commit 91f0139

Please sign in to comment.