Skip to content

Commit f05f37d

Browse files
Merge branch '4.4' into 5.0
* 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
2 parents 6d15b8c + 0bc6184 commit f05f37d

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) {
@@ -193,7 +196,11 @@
193196
'requires' => ['php' => '*'],
194197
];
195198

196-
if (1 === count($info['versions'])) {
199+
$stableVersions = array_filter($info['versions'], function($v) {
200+
return !preg_match('/-dev$|^dev-/', $v);
201+
});
202+
203+
if (!$stableVersions) {
197204
$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.*\"");
198205
} else {
199206
$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)