Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 路由循环引用_Php_Symfony - Fatal编程技术网

Php 路由循环引用

Php 路由循环引用,php,symfony,Php,Symfony,这里是我的app/config/routing.yml AppBundle: resource: "@AppBundle/Controller/" type: annotation prefix: / RapportBundle: resource: "@RapportBundle/Controller/" type: annotation prefix: /rapport fos_user: resource:

这里是我的
app/config/routing.yml

AppBundle:
    resource: "@AppBundle/Controller/"
    type:     annotation
    prefix:   /

RapportBundle:
    resource: "@RapportBundle/Controller/"
    type:     annotation
    prefix:   /rapport

fos_user:
    resource: "@FOSUserBundle/Resources/config/routing/all.xml"
reportbundle/Controller/reportcontroller.php

<?php

namespace RapportBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class RapportController extends Controller
{
    /**
     * @Template
     * @Route("/", name="rapport_index")
     */
    public function indexAction()
    {

        return [];
    }
}
(我的路由没有改变,它是Symfony2基)

你知道为什么吗?我回答自己:


我只是忘了将软件包添加到AppKernel…

集成一些CMF软件包时遇到同样的问题。这个错误确实很容易引起误解。
Circular reference detected in "/var/www/my-site/app/config/routing_dev.yml" ("/var/www/my-site/app/config/routing_dev.yml" > "/var/www/my-site/app/config/routing.yml" > "/var/www/my-site/app/config/routing_dev.yml").