FOS UserBundle UserManager::__construct() 必须是 ObjectManager 的实例

ale*_*eif 7 symfony fosuserbundle symfony4

全新安装 symfony 4.4,然后是 symfony flex 和一些常见的配方,然后我试图设置 fos userbundle,我遇到了这个问题,我无法解决。

Argument 3 passed to FOS\UserBundle\Doctrine\UserManager::__construct() must be an instance of Doctrine\Common\Persistence\ObjectManager, instance of Doctrine\ORM\EntityManager given, called in /srv/www/alexseif/var/cache/dev/ContainerYzHcxci/srcApp_KernelDevDebugContainer.php on line 1660
Run Code Online (Sandbox Code Playgroud)

dah*_*ahe 6

除了不再维护 FOSUserBundle,因此不应在新项目中使用之外,我也必须解决这个问题:

"doctrine/common": "^2.8",在我的情况下,添加到 composer.json 就足够了。