简体   繁体   中英

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

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.

Try updating your composer.json file by running 'composer update' in your terminal. I solved the similar error by updating it. May this help.

Add Mail user and mail password

Make the following changes for getting rid of the error

parameters.yml

parameters: mailer_user: null mailer_password: null

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM