8000 install PHPUnit 6 on PHP 7.2 · symfony/symfony@30336ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 30336ea

Browse files
committed
install PHPUnit 6 on PHP 7.2
1 parent f47626c commit 30336ea

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/Symfony/Bridge/PhpUnit/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.4.0
5+
-----
6+
7+
* PHPUnit 6 is installed when using PHP 7.2+
8+
49
3.3.0
510
-----
611

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@
1515

1616
error_reporting(-1);
1717

18-
// PHPUnit 4.8 does not support PHP 7, while 5.1 requires PHP 5.6+
19-
$PHPUNIT_VERSION = PHP_VERSION_ID >= 50600 ? getenv('SYMFONY_PHPUNIT_VERSION') ?: '5.7' : '4.8';
18+
if (PHP_VERSION_ID >= 70200) {
19+
// PHPUnit 6 is required for PHP 7.2+
20+
$PHPUNIT_VERSION = getenv('SYMFONY_PHPUNIT_VERSION') ?: '6.3';
21+
} elseif (PHP_VERSION_ID >= 50600) {
22+
// PHPUnit 4 does not support PHP 7
23+
$PHPUNIT_VERSION = getenv('SYMFONY_PHPUNIT_VERSION') ?: '5.7';
24+
} else {
25+
// PHPUnit 5.1 requires PHP 5.6+
26+
$PHPUNIT_VERSION = '4.8';
27+
}
28+
2029
$oldPwd = getcwd();
2130
$PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: (__DIR__.'/.phpunit');
2231
$PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php';

0 commit comments

Comments
 (0)
0