silverstripe/sapphire — pull request #940 by chillu (2012-11-08 17:00:30+00:00)
Title: Fetch PHPUnit dependency through composer

This is an officially supported way of installing PHPUnit 3.7 now.
The more up-to-date devs have been running 3.7 in their own tests for a while, so I don't think there'll be any problems with this version upgrade as such.

One general change necessary was integration of the Composer autoloader in Core.php.
Its only used as a fallback if the SS autoloader doesn't find a class,
so should have minimal performance impact.
@ajshort's work will fix this properly for 3.1 by unifying autoloading into composer (from what I can remember).

I've tried running this in parallel with an older PHPUnit version installed through PEAR (with PEAR being in the standard `include_path`), and didn't get any problems with redeclared classes etc.

Note: We can't backport this to 2.4, since PHPUnit 3.7 requires PHP 5.3.3+.

As a followup task: Remove the PHPUnit 3.4/3.5 wrappers from framework, and require 3.7. That's probably something for master though. Or can you guys think of any problems this would create? Our build infrastructure has its own managed PHPUnit versions anyway.