Symfony2 FOSUserBundle Error - FileLoaderImportCircularReferenceException

I am trying to install FOSUserBundle in a new symfony2 project. I followed the steps to install it, but I'm still having problems 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").

When I try to start php app/console router:debug, I get an error message:

 [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.     

Even if I download the package in AppKernel.

In routing.yml, I have (if that helps):

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

It seems that I can not find anything on this, but I apologize if I did not look good enough.

+4
source share
5 answers

Removed AcmeDemoBundle from the project, but did not remove the associated routing code from the file routing_dev.yml.

+3
source

, , , , :

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;

. , , :

FileLoaderImportCircularReferenceException
0

, :

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

. Symfony @Route.

0

, .

: yml.

abc_bundle_route:
path:     /my-url/{id}
defaults: { _controller: ABCBundle:Monitor:mycontroller, id: 0 }
    requirements:
        id: -?\d+

():

abc_bundle_route:
path:     /my-url/{id}
defaults: { _controller: ABCBundle:Monitor:mycontroller, id: 0 }
requirements:
    id: -?\d+

, .

0

MyController extends Controller
-2

All Articles