X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/userbundle/blobdiff_plain/e3993664bfc14572e614054b26cab3d23eb867c5..ac10223cb33c7f8292e541a04112f4027f28c290:/Factory.php 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);