zendframework1-doctrine2
zendframework1-doctrine2 copied to clipboard
Doctrine 2.1.6 works, 2.2 doesn't (Annotations not imported)
Hi,
iam using the newest Version of the bisna-library. In Doctrine 2.1.6 the integration works properly, but when i upgrade to Doctrine 2.2 the annotation-reading fails. I get the following:
Semantical Error] The annotation "@Table" in class Project\Entity\AclRoles was never imported. Did you maybe forget to add a "use" statement for this annotation?
What can i do here?
I've encountered the same problem (See #23). Guilhermeblanco merged my pull request two days ago, so it should be working if you use the current master.
I forgot to mention that I've changed the annotationReaderClass to the SimpleAnnotationReader:
resources.doctrine.orm.entityManagers.default.metadataDrivers.drivers.0.annotationReaderClass = "Doctrine\Common\Annotations\SimpleAnnotationReader"
@bountin using the SimpleAnnotationReader will break the namespace loading for Doctrine 2.2, the default annotation reader is what works
The problem doesn't go away if AnnotationReader
is used in Doctrine 2.2.2. Changing, as @bountin suggests, to SimpleAnnotationReader
works. If this is an incorrect way, then the bug still exists.