简体   繁体   English

Sonata用户捆绑的symfony 3.4问题与Flex的安装

[英]sonata user-bundle symfony 3.4 problem installation with Flex

I have a problem with the installation of sonata-project/user-bundle on a Symfony 3.4 project using Symfony Flex . 我在使用Symfony FlexSymfony 3.4项目上安装sonata-project / user-bundle时遇到问题。

After the installation, during the execution of the script cache:clear, this one returned KO and the message is: 安装后,在执行脚本cache:clear的过程中,该脚本返回了KO,消息为:

The child node "db_driver" at path "fos_user" must be configured.

Does someone have an idea to fix this problem? 有人有解决此问题的想法吗?

Thanks for your help, 谢谢你的帮助,

Because Sonata User is built on top of FOS User you have to also configure the FOS bundle. 由于Sonata用户是基于FOS用户构建的,因此您还必须配置FOS捆绑软件。

https://symfony.com/doc/current/bundles/FOSUserBundle/index.html#step-5-configure-the-fosuserbundle https://symfony.com/doc/current/bundles/FOSUserBundle/index.html#step-5-configure-the-fosuserbundle

Step 5 here will fix your problem. 这里的第5步将解决您的问题。

fos_user:
    db_driver: orm # other valid values are 'mongodb' and 'couchdb'
    firewall_name: main
    user_class: AppBundle\Entity\User
    from_email:
        address: "%mailer_user%"
        sender_name: "%mailer_user%"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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