sebastianbergmann/phpunit — pull request #649 by Seldaek (2012-09-18 12:02:27+00:00)
Title: Use psr0 autoloading instead of requiring a bunch of phpunit files at every request

This one is slightly problematic.

Basically force-including PHPUnit/Autoload.php and similar files in satellite projects is not a good thing, because those register a lot of autoloaders, and require a few files already, which means if you have phpunit installed in your project, whenever you include the composer autoloader you end up loading a bunch of PHPUnit files you'll most likely not need.

So the solution is to switch to PSR-0 autoloading, which seems to work fine apart from PHPUnit_Util_GlobalState that calls phpunit_autoload() which fails obviously. So I attempted to workaround the issue by just returning phpunit files from the declared classes. I'm not sure however whether this is complete nor if it is an acceptable workaround since I'm not sure in which contexts this method is used. That said I don't see a better way to fix it apart from reworking the code a bit more so that the classmap used in phpunit_autoload() is available separately/individually in another file of the project.

If this solution should be accepted, the same change to composer.json should be applied to all satellite projects with their respective PSR-0 prefixes.