8000 feature #29439 [PhpUnitBridge] install PHPUnit 7 on PHP 7.1 and fix r… · symfony/symfony@0d01a5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 0d01a5f

Browse files
committed
feature #29439 [PhpUnitBridge] install PHPUnit 7 on PHP 7.1 and fix requir. for PHPUnit 6 (gregurco)
This PR was merged into the 4.3-dev branch. Discussion ---------- [PhpUnitBridge] install PHPUnit 7 on PHP 7.1 and fix requir. for PHPUnit 6 | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Added support of PHPUnit 7.4 if PHP version is 7.1+ (release link: https://packagist.org/packages/phpunit/phpunit#7.4.5). Also I found that PHPUnit 6.5 required PHP 7.0, not 7.2 (proof: https://packagist.org/packages/phpunit/phpunit#6.5.13) Commits ------- 30609bf [PhpUnitBridge] install PHPUnit 7 on PHP 7.1 and fix require for PHPUnit 6
2 parents d62ecd5 + 30609bf commit 0d01a5f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ $getEnvVar = function ($name, $default = false) {
4545
return $default;
4646
};
4747

48-
if (PHP_VERSION_ID >= 70200) {
49-
// PHPUnit 6 is required for PHP 7.2+
48+
if (PHP_VERSION_ID >= 70100) {
49+
// PHPUnit 7 requires PHP 7.1+
50+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '7.4');
51+
} elseif (PHP_VERSION_ID >= 70000) {
52+
// PHPUnit 6 requires PHP 7.0+
5053
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '6.5');
5154
} elseif (PHP_VERSION_ID >= 50600) {
52-
// PHPUnit 4 does not support PHP 7
55+
// PHPUnit 5 requires PHP 5.6+
5356
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '5.7');
5457
} else {
55-
// PHPUnit 5.1 requires PHP 5.6+
5658
$PHPUNIT_VERSION = '4.8';
5759
}
5860

0 commit comments

Comments
 (0)
0