X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/blogbundle/blobdiff_plain/f151e35c05c6680f81a50b72f62342d8d4a7045c..6f10900dc329f1f3ea0246fa358e5fb7133a0cd0:/Factory/RepositoryFactory.php diff --git a/Factory/RepositoryFactory.php b/Factory/RepositoryFactory.php index 893b03b..a795410 100644 --- a/Factory/RepositoryFactory.php +++ b/Factory/RepositoryFactory.php @@ -13,7 +13,7 @@ namespace Rapsys\BlogBundle\Factory; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Repository\RepositoryFactory as RepositoryFactoryInterface; -use Doctrine\Persistence\ObjectRepository; +use Doctrine\ORM\EntityRepository; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\RouterInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -106,7 +106,7 @@ final class RepositoryFactory 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); @@ -126,7 +126,7 @@ final class RepositoryFactory implements RepositoryFactoryInterface { * @param EntityManagerInterface $entityManager The EntityManager instance. * @param string $entityName The name of the entity. */ - private function createRepository(EntityManagerInterface $entityManager, string $entityName): ObjectRepository { + private function createRepository(EntityManagerInterface $entityManager, string $entityName): EntityRepository { //Get class metadata $metadata = $entityManager->getClassMetadata($entityName);