mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1247: Implement AnnotationDriver::addExcludePath #1571
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 @doctrinebot on GitHub (Jul 4, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user hosiplan:
Hi,
I've been having issues with AnnotationDriver crawling in my directories and loading files.
I have a few classes that require specific libraries loaded, and I don't want the AnnotationDriver to load them.
For example, I have my descendant of PHPUnit_Framework_TestCase in libs and the driver just dies, because PHPUnit is not loaded, and I don't want to load it, to be able to finish the process.
Solution would be add method
AnnotationDriver::addExcludePath, whose name speaks for itself :)Temporarily, I had to extend the AnnotationDriver and overload the crawling process, which is realy annoing, because I had to copy the whole method with all its exceptions and I would have to maintain it, till this will be in Doctrine. Can be viewed here https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php
Thanks
Filip