Forward colors option to PHPUnit, even when it matches the default option value.#1103
Draft
mickverm wants to merge 1 commit into
Draft
Forward colors option to PHPUnit, even when it matches the default option value.#1103mickverm wants to merge 1 commit into
mickverm wants to merge 1 commit into
Conversation
Slamdunk
requested changes
Apr 29, 2026
Member
Slamdunk
left a comment
There was a problem hiding this comment.
Thank you: could you please add a test, so we can be sure the bug doesn't get reintroduced in the future?
Author
|
Yes, I was still working on it 😛 |
…the default option value.
dc63542 to
1120c12
Compare
mickverm
commented
Apr 29, 2026
| unset($options['functional']); | ||
|
|
||
| assert(array_key_exists('colors', $options)); | ||
| if ($options['colors'] === Configuration::COLOR_DEFAULT) { |
Author
There was a problem hiding this comment.
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.
Author
|
@Slamdunk could you point me in the direction of a related test? I'm having trouble figuring out how I could properly test this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1101