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

问题描述

我正在尝试在新的symfony2项目上安装FOSUserBundle.我已经按照步骤进行安装,但是仍然遇到此错误:

I'm trying to install FOSUserBundle on a new symfony2 project. I've followed the steps to get it installed but I'm still having trouble with this error:

FileLoaderImportCircularReferenceException in FileLoader.php line 97:
Circular reference detected in "/Users/tom/Sites/symfony/todo/app/config/routing_dev.yml" ("/Users/tom/Sites/symfony/todo/app/config/routing_dev.yml" > "/Users/tom/Sites/symfony/todo/app/config/routing.yml" > "/Users/tom/Sites/symfony/todo/app/config/routing_dev.yml").

当我尝试运行php app/console router:debug时,出现错误:

When I try to run php app/console router:debug I am getting the error:

 [Symfony\Component\Config\Exception\FileLoaderLoadException]
  Cannot load resource "@FOSUserBundle/Resources/config/routing/all.xml". Make sure the "FOSUserBundle" bu
  ndle is correctly registered and loaded in the application kernel class.

即使我将捆绑软件加载到AppKernel中.

Even though I am loading the bundle in the AppKernel.

在routing.yml中,我有(如果有帮助的话):

In routing.yml I have (if it helps):

fos_user:
    resource: "@FOSUserBundle/Resources/config/routing/all.xml"

似乎无法在此找到任何内容,但是,如果我没有很好地进行搜索,我深表歉意.

Can't seem to find anything on this however I apologise if I haven't searched around well enough.

推荐答案

已经从项目中删除了AcmeDemoBundle,但是没有从routing_dev.yml文件中删除了相关的路由代码.

Had deleted the AcmeDemoBundle from the project but hadn't removed the related routing code from the routing_dev.yml file.

这篇关于Symfony2 FOSUserBundle错误-FileLoaderImportCircularReferenceException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-21 01:15