This is similar this SO question, but it is manifesting with composer instead of pear.
My relevant composer.json lines:
"require-dev": {
"phpunit/phpunit": "3.7.14",
"symfony/browser-kit": ">=2.3,<2.4-dev"
},
Create this include_paths.php file in vendor/composer:
return array(
$vendorDir . '/phpunit/phpunit-mock-objects',
$vendorDir . '/phpunit/php-timer',
$vendorDir . '/phpunit/php-token-stream',
$vendorDir . '/phpunit/php-code-coverage',
$vendorDir . '/phpunit/phpunit',
$vendorDir . '/symfony/yaml',
);
Running "php vendor/bin/phpunit" triggers the error:
PHPUnit_Framework_Exception: PHP Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in /path/to/project/vendor/phpunit/phpunit/PHPUnit/Autoload.php on line 45
I can fix the problem by manually adding the missing include path into the array like:
$vendorDir . '/phpunit/php-file-iterator',
But that will disappear the next time I run Composer.
I'm guessing I have an error in my composer.json, but I can't really think of what it is.