mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1104: Require statement in AnnotationDriver.php can cause PHP Fatal error #1381
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 (Apr 6, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user majkl578:
The require statement in
Doctrine/ORM/Mapping/Driver/AnnotationDriver.phpcauses 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