[PhpUnitBridge] Ability to use different composer.json file

This commit is contained in:
amcastror 2018-03-10 15:48:33 -03:00 committed by Fabien Potencier
parent 8f4a0b61c5
commit 77e643d0ba

View File

@ -26,8 +26,13 @@ if (PHP_VERSION_ID >= 70200) {
$PHPUNIT_VERSION = '4.8';
}
if ('composer.json' !== $COMPOSER_JSON = getenv('COMPOSER') ?: 'composer.json') {
putenv('COMPOSER=composer.json');
$_SERVER['COMPOSER'] = $_ENV['COMPOSER'] = 'composer.json';
}
$root = __DIR__;
while (!file_exists($root.'/composer.json') || file_exists($root.'/DeprecationErrorHandler.php')) {
while (!file_exists($root.'/'.$COMPOSER_JSON) || file_exists($root.'/DeprecationErrorHandler.php')) {
if ($root === dirname($root)) {
break;
}