Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ public static function fromConsoleInput(InputInterface $input, string $cwd): sel
$functional = $options['functional'];
unset($options['functional']);

assert(array_key_exists('colors', $options));
if ($options['colors'] === Configuration::COLOR_DEFAULT) {
Copy link
Copy Markdown
Author

@mickverm mickverm Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discovered that when I simply removed the 'if', the option fell back to the default nonetheless (when not passed as an argument) because of what was on line 700. Which meant it fell back to --colors=never, which would override the colors="true" configured in phpunit.dist.xml.

unset($options['colors']);
} elseif ($options['colors'] === null) {
$options['colors'] = Configuration::COLOR_AUTO;
}

assert(array_key_exists('coverage-text', $options));
if ($options['coverage-text'] === null) {
$options['coverage-text'] = 'php://stdout';
Expand Down Expand Up @@ -695,9 +688,8 @@ public static function setInputDefinition(InputDefinition $inputDefinition): voi
new InputOption(
'colors',
null,
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'@see PHPUnit guide, chapter: ' . $chapter = 'Reporting',
Configuration::COLOR_DEFAULT,
),
new InputOption(
'no-progress',
Expand Down