本文介绍了尝试安装 FOSUserBundle 但出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从以下链接安装 FOSUserBundle如何安装第 3 方捆绑包,但收到此错误:

trying to install FOSUserBundle bundle from below link How to install 3rd party Bundles but getting this error :

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

推荐答案

您忘记在 app/config/config.yml 中添加 FOSUserBundle 的配置或至少没有提供值对于 fos_user.db_driver.

You have forgotten to add the configuration for FOSUserBundle in your app/config/config.yml or at least did not provide a value for fos_user.db_driver.

您必须至少配置 db_driver 、防火墙和您的用户类,否则配置将抛出 InvalidConfigurationException.

You have to configure at least the db_driver , firewall and your user-class otherwise the configuration will throw an InvalidConfigurationException.

# app/config/config.yml
fos_user:
    db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
    firewall_name: main
    user_class: Acme\UserBundle\Entity\User

请参阅文档章节步骤5:配置FOSUserBundle.

这篇关于尝试安装 FOSUserBundle 但出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 00:45