Search code examples
symfonyfosuserbundle

Symfony FOSUser Bundle error The child node "db_driver" at path "fos_user" must be configured


I have just installed FOSUser bundle and initialized it in AppKernel's registereBundles() function , when I run

console cache:clear

It get

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] The child node "db_driver" at path "fos_user" must be configured.

My understanding was that unless or until I am not using a bundle it should not interfere in application flow. I wonder why I get this issue when I have done nothing with FOSUserBundle so far


Solution

  • In your config.yml you have to add primary data.

    # FOSUser
    fos_user:
        db_driver: orm
        firewall_name: main
        user_class: UserBundle\Entity\User
    

    It's configuration for ORM.