Skip to content

Commit 06e1bda

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

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

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-
}
160+
$COMPOSER = ($COMPOSER = getenv('COMPOSER_BINARY'))
161+
|| 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';
168167

169168
$prevCacheDir = getenv('COMPOSER_CACHE_DIR');
170169
if ($prevCacheDir) {

0 commit comments

Comments
 (0)