Skip to content

Commit f73f749

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: 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 4cc6104 + 279ffbf commit f73f749

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
@@ -157,12 +157,14 @@
157157
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
158158
}
159159

160-
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
161-
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar 2> NUL`) : `which composer.phar 2> /dev/null`)))
162-
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer 2> NUL`) : `which composer 2> /dev/null`)))
163-
|| 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')
164-
? ('#!/usr/bin/env php' === file_get_contents($COMPOSER, false, null, 0, 18) ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
165-
: 'composer';
160+
if (false === $COMPOSER = getenv('COMPOSER_BINARY')) {
161+
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar')
162+
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar 2> NUL`) : `which composer.phar 2> /dev/null`)))
163+
|| ($COMPOSER = rtrim((string) ('\\' === \DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer 2> NUL`) : `which composer 2> /dev/null`)))
164+
|| 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')
165+
? ('#!/usr/bin/env php' === file_get_contents($COMPOSER, false, null, 0, 18) ? $PHP : '').' '.escapeshellarg($COMPOSER) // detect shell wrappers by looking at the shebang
166+
: 'composer';
167+
}
166168

167169
$prevCacheDir = getenv('COMPOSER_CACHE_DIR');
168170
if ($prevCacheDir) {

0 commit comments

Comments
 (0)