[PhpUnitBridge] Ability to use different composer.json file
This commit is contained in:
parent
8f4a0b61c5
commit
77e643d0ba
@ -26,8 +26,13 @@ if (PHP_VERSION_ID >= 70200) {
|
|||||||
$PHPUNIT_VERSION = '4.8';
|
$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__;
|
$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)) {
|
if ($root === dirname($root)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user