Search code examples
phpsymfonysymfony-2.6

Symfony2 error in security.yml


I need help with fixing this error and I am using symfony 2.6

ServiceNotFoundException: The service "fos_user.security.login_manager" has a dependency on a non-existent service "security.context".


Solution

  • security.context is deprecated since Symfony 2.6. You shouldn't have any problem because it's backward compatible, but you should check if you need to update your FOSUserBundle.

    Run a composer update and check it.

    More on the subject: http://symfony.com/blog/new-in-symfony-2-6-security-component-improvements

    If this doesn't solve, try the steps in this Stackoverflow answer.