What is a Semantical Error Symfony2
doctrine-orm, php, symfony
Solution
Wrap your template definition in quotes. Otherwise it's looking for it in a PHP constant when the annotation gets looked up, and that is the error you are seeing as there is no constant with that name.
/**
* Creates a new Product entity.
*
* @Route("/", name="product_create")
* @Method("POST")
* @Template("CJBusinessBundle:PO:new.html.twig")
*/
Problem
I am getting this error ``` [Doctrine\Common\Annotations\AnnotationException] [Semantical Error] Couldn't find constant CJBusinessBundle:PO:new, method CJ\BusinessBundle\Controller\ProductController::createAction(). ``` My Annotation Part ``` /** * Creates a new Product entity. * * @Route("/", name="product_create") * @Method("POST") * @Template(CJBusinessBundle:PO:new.html.twig) */ ``` I don't understand what would be the issue with this