Skip to content

Commit bc368b7

Browse files
committed
Merge branch '5.2' into 5.3
* 5.2: [Validator] Backport type fixes [HttpFoundation] fix FileBag under PHP 8.1 Fix composer resolution on windows
2 parents 2721b2d + 06e1bda commit bc368b7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

bin/simple-phpunit.php

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

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-
}
150+
$COMPOSER = ($COMPOSER = getenv('COMPOSER_BINARY'))
151+
|| 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';
158157

159158
$prevCacheDir = getenv('COMPOSER_CACHE_DIR');
160159
if ($prevCacheDir) {

0 commit comments

Comments
 (0)