Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.fos_userbundle"

Tags:

I trying to enable FOSUserBundle as well as FOSFacebookBundle.
I've got an exception at any url.

Any ideas guys?

ServiceNotFoundException: The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.fos_userbundle"

config.yml

fos_user:     db_driver: mongodb     firewall_name: main     user_class: Acme\AcmeBundle\Document\User fos_twitter:     file: %kernel.root_dir%/../vendor/twitteroauth/twitteroauth/twitteroauth.php     consumer_key:    ''     consumer_secret: ''     callback_url: '' fos_facebook:     file:   %kernel.root_dir%/../vendor/facebook/src/base_facebook.php     alias:  facebook     app_id: ''     secret: ''     cookie: true     permissions: [email, user_birthday, user_location] services:     my.facebook.user:         class: Acme\AcmeBundle\Security\FacebookProvider         arguments:             facebook: "@fos_facebook.api"             userManager: "@fos_user.user_manager"             validator: "@validator"             container: "@service_container"      security:            factories:       - "%kernel.root_dir%/../vendor/bundles/FOS/TwitterBundle/Resources/config/security_factories.xml"       - "%kernel.root_dir%/../vendor/bundles/FOS/FacebookBundle/Resources/config/security_factories.xml"      providers:         my_fos_facebook_provider:             id: my.facebook.user                           firewalls:                public:           pattern:   ^/.*           form_login:             login_path: /login             provider: fos_userbundle                     fos_facebook:             app_url: ""             server_url: ""             login_path: /login             check_path: /login_check/facebook             provider: my_fos_facebook_provider           anonymous: true           logout:    true      access_control:         - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }         - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }         - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }         - { path: ^/admin, role: ROLE_ADMIN }      role_hierarchy:         ROLE_ADMIN:       ROLE_USER         ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]   
like image 953
synthetic Avatar asked Nov 21 '11 16:11

synthetic


1 Answers

I added fos_userbundle id to providers section and it works fine now.

providers:     my_fos_facebook_provider:         id: my.facebook.user       fos_userbundle:         id: fos_user.user_manager 
like image 53
synthetic Avatar answered Sep 28 '22 06:09

synthetic