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").