From: Raphaƫl Gertz Date: Thu, 26 Nov 2026 15:31:16 +0000 (+0100) Subject: Match doctrine prototype X-Git-Tag: 0.6.0~7 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/userbundle/commitdiff_plain/6e567de09b7c14b56c91ef9d5d91eee94b1d14e3?ds=inline Match doctrine prototype --- diff --git a/Factory.php b/Factory.php index 3a8702a..c437dc2 100644 --- a/Factory.php +++ b/Factory.php @@ -13,7 +13,7 @@ namespace Rapsys\UserBundle; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Repository\RepositoryFactory as RepositoryFactoryInterface; -use Doctrine\Persistence\ObjectRepository; +use Doctrine\ORM\EntityRepository; use Psr\Container\ContainerInterface; @@ -48,7 +48,7 @@ class Factory implements RepositoryFactoryInterface { /** * {@inheritdoc} */ - public function getRepository(EntityManagerInterface $entityManager, mixed $entityName): ObjectRepository { + public function getRepository(EntityManagerInterface $entityManager, mixed $entityName): EntityRepository { //Set repository hash $repositoryHash = $entityManager->getClassMetadata($entityName)->getName() . spl_object_hash($entityManager); @@ -68,7 +68,7 @@ class Factory implements RepositoryFactoryInterface { * @param EntityManagerInterface $entityManager The EntityManager instance. * @param string $entityName The name of the entity. */ - protected function createRepository(EntityManagerInterface $entityManager, string $entityName): ObjectRepository { + protected function createRepository(EntityManagerInterface $entityManager, string $entityName): EntityRepository { //Get class metadata $metadata = $entityManager->getClassMetadata($entityName);