mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
registerAnnotationClasses #5114
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @juliangut on GitHub (Apr 28, 2016).
Originally assigned to: @Ocramius on GitHub.
Is it possible to have an registerAnnotationClasses method on AnnotationDriver (as in mongodb-odm) so it is not mandatory to call Doctrine\ORM\Configuration::newDefaultAnnotationDriver or AnnotationRegistry::registerFile with the correct path?
Mongodb-odm:
https://github.com/doctrine/mongodb-odm/blob/master/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php#L51
@Ocramius commented on GitHub (May 10, 2016):
When not using the setup facility, you are simply required to build the annotation driver yourself, or to simply use
AnnotationRegistry::registerLoader('class_exists)` (to force autoloading of annotations).We plan to drop this sort of complexity overall, rather than making it "easier" to set up things.
Closing as
won't fix@juliangut commented on GitHub (May 10, 2016):
OK, thanks for the class_exists hint. It has been 12 days since I posted this issue so I decided to create the PR
@Ocramius commented on GitHub (May 13, 2016):
@juliangut no problem. Sorry for the timing, I get to pick up a fraction of what hits my inbox, and that with delays.