Skip to content

Loading…

DCOM-39: It is not possible to load multiple directories under the same namespace #638

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user ratius:

Consider the following code snippet:

$loader = new ClassLoader('DoctrineExtensions',
   "/path/to/vendor/doctrine2-extensions-beberlei/lib");
$loader->register();

$loader = new ClassLoader('DoctrineExtensions',
   "/path/to/vendor/doctrine2-extensions-srosato/lib");
$loader->register();

The latter will not be able to be loaded since the documentation specifies (with good reason) that class loaders do not fail silently. Is there a workaround for this issue?

@doctrinebot

Comment created by ratius:

Or maybe this is intentional, such as authors that write separate doctrine extensions (according to this exemple) must define their own namespace.

@doctrinebot

Comment created by @beberlei:

This is desired behavior, you need to pass a more specific path like "DoctrineExtensions/Versionable" + "DoctrineExtensions/Paginate" and so on...

@doctrinebot

Issue was closed with resolution "Invalid"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.