Skip to content

Commit 4bcdb6b

Browse files
Merge branch '10.5' into 11.0
2 parents 23e1d9f + a03cf97 commit 4bcdb6b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ChangeLog-11.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ All notable changes of the PHPUnit 11.0 release series are documented in this fi
1818

1919
* [#5351](https://github.com/sebastianbergmann/phpunit/issues/5351): Incorrect code coverage metadata does not prevent code coverage data from being collected
2020
* [#5729](https://github.com/sebastianbergmann/phpunit/pull/5729): `assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys()` does not correctly handle array order
21+
* [#5746](https://github.com/sebastianbergmann/phpunit/issues/5746): Using `-d` CLI option multiple times triggers warning
2122

2223
## [11.0.5] - 2024-03-09
2324

src/TextUI/Configuration/Cli/Builder.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ public function fromParameters(array $parameters): Configuration
251251
$debug = false;
252252

253253
foreach ($options[0] as $option) {
254+
$optionAllowedMultipleTimes = false;
255+
254256
switch ($option[0]) {
255257
case '--colors':
256258
$colors = $option[1] ?: \PHPUnit\TextUI\Configuration\Configuration::COLOR_AUTO;
@@ -354,6 +356,8 @@ public function fromParameters(array $parameters): Configuration
354356
}
355357
}
356358

359+
$optionAllowedMultipleTimes = true;
360+
357361
break;
358362

359363
case 'h':
@@ -845,7 +849,9 @@ public function fromParameters(array $parameters): Configuration
845849
break;
846850
}
847851

848-
$this->markProcessed($option[0]);
852+
if (!$optionAllowedMultipleTimes) {
853+
$this->markProcessed($option[0]);
854+
}
849855
}
850856

851857
if (empty($iniSettings)) {

0 commit comments

Comments
 (0)