Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  fix merge
  Require PHPUnit 9.3 on PHP 8
  [Cache] fix catching auth errors
  Fix CS
  [FrameworkBundle] set default session.handler alias if handler_id is not provided
  Fix CS
  Readability update
  Fix checks for phpunit releases on Composer 2 (resolves #37601)
  [Serializer] Support multiple levels of discriminator mapping
  Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
  [SCA] Minor fixes on tests
  [WebProfilerBundle] modified url generation to use absolute urls
  [Mailer] Fix reply-to functionality in the SendgridApiTransport
  [Mime] Fix compat with HTTP requests
  ticket_36879 - Fix mandrill raw http request setting from email/name
  • Loading branch information
nicolas-grekas committed Jul 23, 2020
2 parents 6d15b8c + 0bc6184 commit f05f37d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/simple-phpunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
}
};

if (PHP_VERSION_ID >= 70200) {
if (PHP_VERSION_ID >= 80000) {
// PHP 8 requires PHPUnit 9.3+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.3');
} elseif (PHP_VERSION_ID >= 70200) {
// PHPUnit 8 requires PHP 7.2+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3');
} elseif (PHP_VERSION_ID >= 70100) {
Expand Down Expand Up @@ -193,7 +196,11 @@
'requires' => ['php' => '*'],
];

if (1 === count($info['versions'])) {
$stableVersions = array_filter($info['versions'], function($v) {
return !preg_match('/-dev$|^dev-/', $v);
});

if (!$stableVersions) {
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress -s dev phpunit/phpunit $PHPUNIT_VERSION_DIR \"$PHPUNIT_VERSION.*\"");
} else {
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit $PHPUNIT_VERSION_DIR \"$PHPUNIT_VERSION.*\"");
Expand Down

0 comments on commit f05f37d

Please sign in to comment.