[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@Entity" in class Application\Entity\Product was never imported. Did you maybe forget to add a "use" statement for this annotation?
So I searched on Google and did the following:
<?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Entity;
/**
* @Entity
* @ORM\Table(name="posts")
* @property int $id
* @property string $title
* @property string $text
*/
class Product
It seems that you aint using Doctrine 2’s annotation properly. I dont know about Doctrine’s annotation, and I honestly think you should not use annotation at all, instead switch to XML or YAML. Annotations in PHP is a very bad idea, because they aint language integrated and instead are placed in PHP comments. This makes your comments more than just comments, which are harder to read and maintain. Read this article and you will understand why: