sebastianbergmann/phpunit — pull request #828 by whatthejeff (2013-02-19 00:57:58+00:00)
Title: Simplified the composer install.

I've been working on making the following possible:

git clone git@github.com:sebastianbergmann/phpunit.git
cd phpunit
composer install --dev
./phpunit.php

After 06ae86d, the only reason this doesn't work is due to hardcoded `require 'PHPUnit/Autoload.php'` calls in the following places:

* [PHPUnit/Framework/Process/TestCaseMethod.tpl.dist](https://github.com/sebastianbergmann/phpunit/blob/fd877d2c1f114317aba8700f382dc7418ea7f0ec/PHPUnit/Framework/Process/TestCaseMethod.tpl.dist#L5)
* [phpunit.xml.dist](https://github.com/sebastianbergmann/phpunit/blob/fd877d2c1f114317aba8700f382dc7418ea7f0ec/phpunit.xml.dist#L5)
* All PHPT tests (like [Tests/TextUI/abstract-test-class.phpt](https://github.com/sebastianbergmann/phpunit/blob/fd877d2c1f114317aba8700f382dc7418ea7f0ec/Tests/TextUI/abstract-test-class.phpt)).

The problem is the paths from `PHPUnit/Autoload.php` differ from the composer paths for the following packages:

"sebastian/diff": ">=1.0.0",
"sebastian/exporter": ">=1.0.0",
"sebastian/version": ">=1.0.0",

There are a couple of ways to fix this, but by far the simplest is to check for a composer-based environment inside of `PHPUnit/Autoload.php`. The downside to this approach is obviously extra file system operations for non-composer users. This can be avoided for PEAR users if necessary–not sure how important it is.