bug #23952 [PhpUnitBridge] install PHPUnit 6 on PHP 7.2 (xabbuh)
This PR was merged into the 3.3 branch.
Discussion
----------
[PhpUnitBridge] install PHPUnit 6 on PHP 7.2
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23943
| License | MIT
| Doc PR |
Commits
-------
30336ead94
install PHPUnit 6 on PHP 7.2
This commit is contained in:
commit
faa83282bc
@ -1,6 +1,11 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
3.4.0
|
||||||
|
-----
|
||||||
|
|
||||||
|
* PHPUnit 6 is installed when using PHP 7.2+
|
||||||
|
|
||||||
3.3.0
|
3.3.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -15,8 +15,17 @@
|
|||||||
|
|
||||||
error_reporting(-1);
|
error_reporting(-1);
|
||||||
|
|
||||||
// PHPUnit 4.8 does not support PHP 7, while 5.1 requires PHP 5.6+
|
if (PHP_VERSION_ID >= 70200) {
|
||||||
$PHPUNIT_VERSION = PHP_VERSION_ID >= 50600 ? getenv('SYMFONY_PHPUNIT_VERSION') ?: '5.7' : '4.8';
|
// PHPUnit 6 is required for PHP 7.2+
|
||||||
|
$PHPUNIT_VERSION = getenv('SYMFONY_PHPUNIT_VERSION') ?: '6.3';
|
||||||
|
} elseif (PHP_VERSION_ID >= 50600) {
|
||||||
|
// PHPUnit 4 does not support PHP 7
|
||||||
|
$PHPUNIT_VERSION = getenv('SYMFONY_PHPUNIT_VERSION') ?: '5.7';
|
||||||
|
} else {
|
||||||
|
// PHPUnit 5.1 requires PHP 5.6+
|
||||||
|
$PHPUNIT_VERSION = '4.8';
|
||||||
|
}
|
||||||
|
|
||||||
$oldPwd = getcwd();
|
$oldPwd = getcwd();
|
||||||
$PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: (__DIR__.'/.phpunit');
|
$PHPUNIT_DIR = getenv('SYMFONY_PHPUNIT_DIR') ?: (__DIR__.'/.phpunit');
|
||||||
$PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php';
|
$PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php';
|
||||||
|
Reference in New Issue
Block a user