Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console][PhpUnitBridge][VarDumper] Add support forFORCE_COLOR environment variable#57777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
serious-angel left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I am not sure aboutCHANGELOG file and how breaking it is.
Please suggest any details if possible.
Related:chalk/supports-color#105
nicolas-grekas commentedJul 19, 2024
Related also:https://force-color.org/ |
nicolas-grekas commentedJul 19, 2024
BTW,https://no-color.org/ tells that the NO_COLOR env var should not be the empty string, and we don't follow this spec currently. I think we should. |
FORCE_COLOR environment variable…alue handling (alexandre-daubois)This PR was merged into the 5.4 branch.Discussion----------[Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |#57777 (comment)| License | MIT`NO_COLOR` must be non-empty in order to be considered enabled (https://no-color.org/):> when present and not an empty string (regardless of its value)Commits-------6a96ff9 [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
…alue handling (alexandre-daubois)This PR was merged into the 5.4 branch.Discussion----------[Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |symfony/symfony#57777 (comment)| License | MIT`NO_COLOR` must be non-empty in order to be considered enabled (https://no-color.org/):> when present and not an empty string (regardless of its value)Commits-------6a96ff9116 [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
alexandre-daubois commentedJul 29, 2024
Hi @artshade, you may have a look at this fix to be sure to update everywhere it is relevant in Symfony:#57815 |
serious-angel commentedJul 29, 2024
This is awesome! Thank you,@alexandre-daubois ! Have you considered the related forced color option? |
alexandre-daubois commentedJul 29, 2024
You seemed to be well on your way to adding this feature, so I didn't want to impose a PR if you wanted to finish it :) |
serious-angel commentedJul 29, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Changed the priority of if (no_color!=NULL&&no_color[0]!='\0')color= false;// ...if (force_color!=NULL&&force_color[0]!='\0')color= true; Regarding the PR, I am frankly not sure if the current state of the PR is correct considering all the branches and rules. |
derrabus left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you. Please add a test.
FORCE_COLOR environment variableFORCE_COLOR environment variablenicolas-grekas commentedAug 13, 2024
Thank you @artshade. |
serious-angel commentedAug 13, 2024
I am sorry for not implementing the test in-time... Let it be colors! 🌈 ✨ |
Uh oh!
There was an error while loading.Please reload this page.