-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doctrine] Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry or null, instance of Doctrine\Bundle\DoctrineBundle\Registry given #37935
Comments
This is due to a BC break in Doctrine (see doctrine/DoctrineBundle#1202). Fixed in FrameworkExtraBundle with a new release (v5.6.0). Everything should work again. |
@fabpot Thanks a lot ! |
I'm also having this issue on a fresh install of Symfony 4.4.11 skeleton project. |
Facing same issue |
Can you give some more information? |
Similar issue after "composer update" on symfony 4.4: |
Can you check that you are using the latest version of Symfony Extra Bundle? |
I'm using version 5.2, but in other machine i haven't any problem. I'll try updating to 5.6 |
You need v5.6.1. |
Yes, thank you, now it works. |
Just installed with Symfony-CLI a new project in 5.1.3
When using doctrine I get this errror:
Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry or null, instance of Doctrine\Bundle\DoctrineBundle\Registry given, called in /home/yang/Projects/noyz-symfony/var/cache/dev/ContainerZxrp7lI/App_KernelDevDebugContainer.php on line 1512
Indeed when looking we have
Doctrine\Bundle\DoctrineBundle\Registry extends Symfony\Bridge\Doctrine\ManagerRegistry
and notDoctrine\Common\Persistence\ManagerRegistry
as expected in atDoctrineParamConverter
Possible fix would be to change in
DoctrineParamConverter.php
:use Doctrine\Common\Persistence\ManagerRegistry;
to
use Symfony\Bridge\Doctrine\ManagerRegistry;
The text was updated successfully, but these errors were encountered: