Something is wrong with documentation or me. I do all what documentation says.
When i put in terminal :
$ php vendor/bin/doctrine orm:schema-tool:c
Had the same issue with custom Doctrine installation. My solution was to re-set metadata driver:
$config->setMetadataDriverImpl(
new Doctrine\ORM\Mapping\Driver\AnnotationDriver(
new Doctrine\Common\Annotations\CachedReader(
new Doctrine\Common\Annotations\AnnotationReader(),
new Doctrine\Common\Cache\ArrayCache()
),
ENTITY_DIR
)
);
Solution from http://support.skipper18.com/1120/how-use-external-tools-generate-doctrine-getters-and-setters?show=1121#a1121 My scenario was generating entities from existing database
The newDefaultAnnotationDriver adds the namespace and the method comments state the following:
If $useSimpleAnnotationReader is true, the notation
@Entitywill work, otherwise, the notation@ORM\Entitywill be supported.