mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DefaultRepositoryFactory create repository using EntityManager instead of ManagerRegistry #6453
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vsilvestre-accenture on GitHub (Apr 22, 2020).
Hi ! :)
I just used TypeTestCase of Symfony, that use a factory in order to test form.
And I just ran into an issue of typing.
TypeError: Argument 1 passed to Picwic\ModelBundle\Repository\CommercialOperationReasonRepository::__construct() must implement interface Doctrine\Common\Persistence\ManagerRegistry, instance of Doctrine\ORM\EntityManager given, called in /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php on line 68It's due to this line.
dafe298ce5/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php (L68)@SenseException commented on GitHub (Apr 22, 2020):
Hi @vsilvestre-accenture. What does the constructor of
CommercialOperationReasonRepositorylooks like and which versions of Doctrine ORM and Persistance do you use? There was a change of namespaces in Persistance whereDoctrine\Common\PersistencebecameDoctrine\Persistenceeven though there should aliases that catch the renaming.