Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: Git Master
-
Fix Version/s: 2.1
-
Component/s: None
-
Security Level: All
-
Labels:None
-
Environment:Linux
Description
The require statement in Doctrine/ORM/Mapping/Driver/AnnotationDriver.php causes troubles in some cases. Imagine the situation when you're creating your own class loader which maps all classes and loads all requested classes lazily. When it loads any class from DoctrineAnnotations.php before loading AnnotationDriver and this class is loaded later, you get: PHP Fatal error: Cannot redeclare class ....
Changing require to require_once solves the problem.
Pull request: https://github.com/doctrine/doctrine2/pull/45
This was fixed for 2.1