Skip to content

Commit 657a8e2

Browse files
Merge branch '5.0' into 5.1
* 5.0: 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
2 parents 84d3277 + f05f37d commit 657a8e2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

bin/simple-phpunit.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@
9393
}
9494
};
9595

96-
if (PHP_VERSION_ID >= 70200) {
96+
if (PHP_VERSION_ID >= 80000) {
97+
// PHP 8 requires PHPUnit 9.3+
98+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.3');
99+
} elseif (PHP_VERSION_ID >= 70200) {
97100
// PHPUnit 8 requires PHP 7.2+
98101
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3');
99102
} elseif (PHP_VERSION_ID >= 70100) {
@@ -194,7 +197,11 @@
194197
'requires' => ['php' => '*'],
195198
];
196199

197-
if (1 === count($info['versions'])) {
200+
$stableVersions = array_filter($info['versions'], function($v) {
201+
return !preg_match('/-dev$|^dev-/', $v);
202+
});
203+
204+
if (!$stableVersions) {
198205
$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.*\"");
199206
} else {
200207
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit $PHPUNIT_VERSION_DIR \"$PHPUNIT_VERSION.*\"");

0 commit comments

Comments
 (0)