registerAnnotationClasses #5114

Closed
opened 2026-01-22 14:58:47 +01:00 by admin · 3 comments
Owner

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

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
admin added the Won't Fix label 2026-01-22 14:58:47 +01:00
admin closed this issue 2026-01-22 14:58:48 +01:00
Author
Owner

@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

@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`
Author
Owner

@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

@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
Author
Owner

@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.

@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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5114