I think you took the config example from Doctrine2: getting started:
$isDevMode = true;
$config = Setup::createAnnotationMetadataConfiguration([__DIR__."/src"], $isDevMode);
The trick is now that the Setup::createAnnotationMetadataConfiguration
method uses a SimpleAnnotationReader
by default. You can change this behaviour by changing the fifth parameter to false
:
$isDevMode = true;
$config = Setup::createAnnotationMetadataConfiguration([__DIR__."/src"], $isDevMode, null, null, false);
This will force Doctrine to use the not-simple AnnotationReader
which can handle your models now!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…