-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
BugHelp wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.PhpUnitBridgeStatus: Needs Review
Description
This long blob can be replaced by getenv('COMPOSER_BINARY')
when run within a composer script, which is not always of course, so the blob has to stay I guess, but if COMPOSER_BINARY is present it'd be nice to use it as that will be guaranteed correct. I just had a case where I had a composer.phar lying around in the current dir and it caused me some problems as it wasn't the composer I wanted to use.
symfony/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
Lines 146 to 151 in 168574d
$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`)) | |
|| ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer`) : `which composer 2> /dev/null`)) | |
|| file_exists($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? `git rev-parse --show-toplevel 2> NUL` : `git rev-parse --show-toplevel 2> /dev/null`).DIRECTORY_SEPARATOR.'composer.phar') | |
? ('#!/usr/bin/env php' === file_get_contents($COMPOSER, false, null, 0, 18) ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang | |
: 'composer'; |
Gemorroj
Metadata
Metadata
Assignees
Labels
BugHelp wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.PhpUnitBridgeStatus: Needs Review