doctrine/common — pull request #74 by mpdeimos (2011-11-16 11:41:58+00:00)
Title: Classloader Fixes

Hey,

I found that the Doctrine Common ClassLoader fails in some situations. Let me summarize:

* `ClassLoader::classExists()` -- fails if a 3rd party class loader does not add a return true statement. This is the case for the Symfony2 class loader and I guess some more. Included is a fix that checks for class_exists after each 'loadClass' call. Dunno if this is the best solution but works.
* `ClassLoader::loadClass()` -- fails if you have spread your source code within multiple directories with a file not found fatal error. Scenario: We're putting program source in `src` and test source in `test-src`, but the underlying namespace structure remains the same. Thus you register two class loaders for the same namespace.

I've included testcases for both scenarios. If you pull and apply just the 1st commit you can test against the current HEAD. Applying both commits will pass the tests.