DDC-393: GlobalClassLoader does not support registering deep namespaces #489

Closed
opened 2026-01-22 12:40:12 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 7, 2010).

Jira issue originally created by user josiah:

A limitation of the current GlobalClassLoader is that you cannot add 'deep' namespace prefixes (e.g. MyProject\Models) as the global class loader stops at the first namespace separator.

I propose that this limitation be listed by attempting to find the deepest (most relevant) prefix prior to loading the class.

I am happy to submit a patch that fixest this limitation.

Originally created by @doctrinebot on GitHub (Mar 7, 2010). Jira issue originally created by user josiah: A limitation of the current GlobalClassLoader is that you cannot add 'deep' namespace prefixes (e.g. MyProject\Models) as the global class loader stops at the first namespace separator. I propose that this limitation be listed by attempting to find the deepest (most relevant) prefix prior to loading the class. I am happy to submit a patch that fixest this limitation.
admin added the New Feature label 2026-01-22 12:40:12 +01:00
admin closed this issue 2026-01-22 12:40:13 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 8, 2010):

Comment created by romanb:

IsolatedClassLoader and GlobalClassLoader are currently deprecated in favor of Doctrine\Common\ClassLoader and scheduled for removal in a future release. That said, I would be willing to un-deprecate the GlobalClassLoader if there is demand and if you have a good patch for deep namespaces. The problem is that such an implementation needs to be fast in order to be a better alternative over multiple ClassLoader instances (which do support deep namespaces out of the box and with optimal performance).

@doctrinebot commented on GitHub (Mar 8, 2010): Comment created by romanb: IsolatedClassLoader and GlobalClassLoader are currently deprecated in favor of Doctrine\Common\ClassLoader and scheduled for removal in a future release. That said, I would be willing to un-deprecate the GlobalClassLoader if there is demand and if you have a good patch for deep namespaces. The problem is that such an implementation needs to be fast in order to be a better alternative over multiple ClassLoader instances (which do support deep namespaces out of the box and with optimal performance).
Author
Owner

@doctrinebot commented on GitHub (Mar 10, 2010):

Comment created by josiah:

I have migrated to the class loader interface and it suits partial name-spaces correctly as is standard within doctrine classes.

However in order to have doctrine models within a zend framework project, a different kind of class loader is required; I have submitted a patch for your perusal: http://www.doctrine-project.org/jira/browse/DDC-400

@doctrinebot commented on GitHub (Mar 10, 2010): Comment created by josiah: I have migrated to the class loader interface and it suits partial name-spaces correctly as is standard within doctrine classes. However in order to have doctrine models within a zend framework project, a different kind of class loader is required; I have submitted a patch for your perusal: http://www.doctrine-project.org/jira/browse/[DDC-400](http://www.doctrine-project.org/jira/browse/DDC-400)
Author
Owner

@doctrinebot commented on GitHub (Mar 28, 2010):

Comment created by @beberlei:

We don't provide support for all the different frameworks autoloading quirks, if you need an autoloader for ZF you should use theirs, or your own.

@doctrinebot commented on GitHub (Mar 28, 2010): Comment created by @beberlei: We don't provide support for all the different frameworks autoloading quirks, if you need an autoloader for ZF you should use theirs, or your own.
Author
Owner

@doctrinebot commented on GitHub (Mar 28, 2010):

Comment created by romanb:

GlobalClassLoader has been removed so this ticket is no longer valid.

@doctrinebot commented on GitHub (Mar 28, 2010): Comment created by romanb: GlobalClassLoader has been removed so this ticket is no longer valid.
Author
Owner

@doctrinebot commented on GitHub (Mar 28, 2010):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Mar 28, 2010): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#489