Skip to content

Commit d7d3193

Browse files
committed
Merge branch '5.2' into 5.3
* 5.2: Reapply the change to allow to set the composer binary path [DependencyInjection] throw proper exception when decorating a synthetic service [WebLink] Sync type with parent interface [WebLink] fix types on Link::withAttribute() [ErrorHandler][DebugClassLoader] Do not check Phake mocks classes
2 parents 15cab72 + f73f749 commit d7d3193

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

bin/simple-phpunit.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,14 @@
147147
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
148148
}
149149

150-
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
151-
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar 2> NUL`) : `which composer.phar 2> /dev/null`)))
152-
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer 2> NUL`) : `which composer 2> /dev/null`)))
153-
|| file_exists($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? `git rev-parse --show-toplevel 2> NUL` : `git rev-parse --show-toplevel 2> /dev/null`)).\DIRECTORY_SEPARATOR.'composer.phar')
154-
? ('#!/usr/bin/env php' === file_get_contents($COMPOSER, false, null, 0, 18) ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
155-
: 'composer';
150+
if (false === $COMPOSER = getenv('COMPOSER_BINARY')) {
151+
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
152+
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar 2> NUL`) : `which composer.phar 2> /dev/null`)))
153+
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer 2> NUL`) : `which composer 2> /dev/null`)))
154+
|| file_exists($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? `git rev-parse --show-toplevel 2> NUL` : `git rev-parse --show-toplevel 2> /dev/null`)).\DIRECTORY_SEPARATOR.'composer.phar')
155+
? ('#!/usr/bin/env php' === file_get_contents($COMPOSER, false, null, 0, 18) ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
156+
: 'composer';
157+
}
156158

157159
$prevCacheDir = getenv('COMPOSER_CACHE_DIR');
158160
if ($prevCacheDir) {

0 commit comments

Comments
 (0)