Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/phpunit-bridge/bin/simple-phpunit @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/vendor/symfony/phpunit-bridge/bin/simple-phpunit Thu Feb 28 13:21:36 2019 +0000 +++ b/vendor/symfony/phpunit-bridge/bin/simple-phpunit Thu May 09 15:33:08 2019 +0100 @@ -26,10 +26,7 @@ $PHPUNIT_VERSION = '4.8'; } -if ('composer.json' !== $COMPOSER_JSON = getenv('COMPOSER') ?: 'composer.json') { - putenv('COMPOSER=composer.json'); - $_SERVER['COMPOSER'] = $_ENV['COMPOSER'] = 'composer.json'; -} +$COMPOSER_JSON = getenv('COMPOSER') ?: 'composer.json'; $root = __DIR__; while (!file_exists($root.'/'.$COMPOSER_JSON) || file_exists($root.'/DeprecationErrorHandler.php')) { @@ -47,6 +44,19 @@ $PHP .= ' -qrr'; } +$defaultEnvs = array( + 'COMPOSER' => 'composer.json', + 'COMPOSER_VENDOR_DIR' => 'vendor', + 'COMPOSER_BIN_DIR' => 'bin', +); + +foreach ($defaultEnvs as $envName => $envValue) { + if ($envValue !== getenv($envName)) { + putenv("$envName=$envValue"); + $_SERVER[$envName] = $_ENV[$envName] = $envValue; + } +} + $COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`)) ? $PHP.' '.escapeshellarg($COMPOSER) : 'composer';