Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 2.7 / 3 - Doctrine: You have requested a non-existent service "fos_user.doctrine_registry"

Doing a composer update today suddenly getting the following error:

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] You have requested a non-existent service "fos_user.doctrine_registry".

when composer is executing the cache:clear --no-warmup command.

Search found an answer related to converting from doctrine to MongoDB but the solutions are not working for me. I am using Doctrine. I've tried Fosuserbundle dev-master, dev-master@dev, 2.0.0-alpha1 and 2.0.0-alpha3.

Any other suggestions? Composer update was working fine a couple of days ago.

like image 866
ken Avatar asked Jan 27 '16 07:01

ken


2 Answers

Issue created here: https://github.com/FriendsOfSymfony/FOSUserBundle/issues/2048

Short term fix (worked for me Symfony 3.0.* ) :

services:     fos_user.doctrine_registry:         alias: doctrine 
like image 54
Andre Avatar answered Oct 06 '22 00:10

Andre


My solution work like a charm... All works with huge mongo dataset

FIX For MongoDB using ODM:

# FIX doctrine registry service for 3.0 and 2.8 sf version fos_user.doctrine_registry:     alias: doctrine_mongodb 
like image 38
Kamil Bednarek Avatar answered Oct 05 '22 23:10

Kamil Bednarek