8000 bug #37771 Use PHPUnit 9.3 on php 8 (derrabus) · symfony/symfony@78cc0ef · GitHub
[go: up one dir, main page]

Skip to content

Commit 78cc0ef

Browse files
committed
bug #37771 Use PHPUnit 9.3 on php 8 (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- Use PHPUnit 9.3 on php 8 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Part of #37564 | License | MIT | Doc PR | N/A Our CI for PHP 8 is currently a blind spot, mainly because the PHPUnit version 8.3 that we use for the test suite is incompatible with php 8. This PR changes the PHPUnit version used on Travis for php 8 to PHPUnit 9.3. Our test suite might not be 100% compatible with that new PHPUnit release yet, but this change should allow us to run most tests on php 8 again and enable us to iteratively migrate to PHPUnit 9.3. Commits ------- d642d85 Use PHPUnit 9.3 on php 8.
2 parents 92eae57 + d642d85 commit 78cc0ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

phpunit

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
1212
if (false === getenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT') && false !== strpos(@file_get_contents(__DIR__.'/src/Symfony/Component/HttpKernel/Kernel.php'), 'const MAJOR_VERSION = 3;')) {
1313
putenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1');
1414
}
15-
putenv('SYMFONY_PHPUNIT_VERSION=8.3');
15+
if (\PHP_VERSION_ID >= 80000) {
16+
putenv('SYMFONY_PHPUNIT_VERSION=9.3');
17+
} else {
18+
putenv('SYMFONY_PHPUNIT_VERSION=8.3');
19+
}
1620
} elseif (\PHP_VERSION_ID >= 70000) {
1721
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
1822
}

0 commit comments

Comments
 (0)
0