Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6af4446

Browse filesBrowse files
committed
bug #39858 Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value (alexander-schranz)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> This should fix that when `SYMFONY_PHPUNIT_VERSION` is set again on empty: ``` SYMFONY_PHPUNIT_VERSION= vendor/bin/simple-phpunit ``` it does not error with: ```bash Creating a "phpunit/phpunit" project at "./phpunit--1" [UnexpectedValueException] Could not parse version constraint .*: Invalid version string ".*" ``` Commits ------- 72ce010 Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value
2 parents 5ba237a + 72ce010 commit 6af4446
Copy full SHA for 6af4446

File tree

1 file changed

+5
-5
lines changed
Filter options

1 file changed

+5
-5
lines changed

‎src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@
9595

9696
if (\PHP_VERSION_ID >= 80000) {
9797
// PHP 8 requires PHPUnit 9.3+
98-
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.4');
98+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '9.4') ?: '9.4';
9999
} elseif (\PHP_VERSION_ID >= 70200) {
100100
// PHPUnit 8 requires PHP 7.2+
101-
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3');
101+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '8.3') ?: '8.3';
102102
} elseif (\PHP_VERSION_ID >= 70100) {
103103
// PHPUnit 7 requires PHP 7.1+
104-
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '7.5');
104+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '7.5') ?: '7.5';
105105
} elseif (\PHP_VERSION_ID >= 70000) {
106106
// PHPUnit 6 requires PHP 7.0+
107-
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '6.5');
107+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '6.5') ?: '6.5';
108108
} elseif (\PHP_VERSION_ID >= 50600) {
109109
// PHPUnit 4 does not support PHP 7
110-
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '5.7');
110+
$PHPUNIT_VERSION = $getEnvVar('SYMFONY_PHPUNIT_VERSION', '5.7') ?: '5.7';
111111
} else {
112112
// PHPUnit 5.1 requires PHP 5.6+
113113
$PHPUNIT_VERSION = '4.8';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.