mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-221: ClassLoader breaks when className starts with \ #277
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 (Dec 22, 2009).
Jira issue originally created by user nicokaiser:
The ClassLoader seems to ignore classNames that start with "".
When it is instantiated in tools/sandbox/doctrine.php with a parameter instead of for the global namespace, it does not find "\Doctrine\Common\Cli\Tasks\HelpTask" (but finds all classes that start with "Doctrine"). To reproduce, change this line in tools/sandbox/doctrine.php
$classLoader = new \Doctrine\Common\ClassLoader();to
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');The script fails now:
PHP Fatal error: Class '\Doctrine\Common\Cli\Tasks\HelpTask' not found in /home/kaiser/doctrine/doctrine/lib/Doctrine/Common/Cli/TaskNamespace.php on line 81
Registering the ClassLoader only for some specific namespaces (e.g. "Doctrine", "Entities", "Proxies") is vital for inclusion in an existing Zend autoloading environment...