Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 77e643d

Browse files
amcastrorfabpot
authored andcommitted
[PhpUnitBridge] Ability to use different composer.json file
1 parent 8f4a0b6 commit 77e643d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ if (PHP_VERSION_ID >= 70200) {
2626
$PHPUNIT_VERSION = '4.8';
2727
}
2828

29+
if ('composer.json' !== $COMPOSER_JSON = getenv('COMPOSER') ?: 'composer.json') {
30+
putenv('COMPOSER=composer.json');
31+
$_SERVER['COMPOSER'] = $_ENV['COMPOSER'] = 'composer.json';
32+
}
33+
2934
$root = __DIR__;
30-
while (!file_exists($root.'/composer.json') || file_exists($root.'/DeprecationErrorHandler.php')) {
35+
while (!file_exists($root.'/'.$COMPOSER_JSON) || file_exists($root.'/DeprecationErrorHandler.php')) {
3136
if ($root === dirname($root)) {
3237
break;
3338
}

0 commit comments

Comments
 (0)