什么是语义错误Symfony2

chi*_*ain 4 php symfony doctrine-orm

我收到了这个错误

[Doctrine\Common\Annotations\AnnotationException]                            
[Semantical Error] Couldn't find constant CJBusinessBundle:PO:new, method 
CJ\BusinessBundle\Controller\ProductController::createAction().    
Run Code Online (Sandbox Code Playgroud)

我的注释部分

/**
 * Creates a new Product entity.
 *
 * @Route("/", name="product_create")
 * @Method("POST")
 * @Template(CJBusinessBundle:PO:new.html.twig)
 */
Run Code Online (Sandbox Code Playgroud)

我不明白这会是什么问题

cat*_*key 6

用引号括起模板定义.
否则,它在寻找它在PHP常数当注释被抬起头来,那就是你所看到的,因为与该名称没有固定的错误.

/**
 * Creates a new Product entity.
 *
 * @Route("/", name="product_create")
 * @Method("POST")
 * @Template("CJBusinessBundle:PO:new.html.twig")
 */
Run Code Online (Sandbox Code Playgroud)