Skip to content

Commit

Permalink
Merge branch '5.2' into 5.3
Browse files Browse the repository at this point in the history
* 5.2:
  [Validator] Backport type fixes
  [HttpFoundation] fix FileBag under PHP 8.1
  Fix composer resolution on windows
  • Loading branch information
derrabus committed Jul 15, 2021
2 parents 2721b2d + 06e1bda commit bc368b7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions bin/simple-phpunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,13 @@
putenv('SYMFONY_DEPRECATIONS_HELPER=disabled');
}

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

$prevCacheDir = getenv('COMPOSER_CACHE_DIR');
if ($prevCacheDir) {
Expand Down

0 comments on commit bc368b7

Please sign in to comment.