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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow handling of color output via environment variable #2662

jhasse opened this Issue Apr 28, 2017 · 2 comments


2 participants
Copy link

jhasse commented Apr 28, 2017

PHPUnit version 5.7.19
PHP version 7.1.4
Installation Method Fedora repositories

My build server logs output (therefore it is not a tty), but supports ANSI color codes. I'm using --color=always. Symfony on the other hand uses --ansi. It would be nice to have an environment variable which forces color output, so that I don't have to remember to add the command line flag to every invocation of phpunit.

In order to standardize this, I've created which suggest to use CLICOLOR_FORCE for this. This is also shared by CMake, Waf and Apple's command line utilities.


This comment has been minimized.

Copy link

sebastianbergmann commented Apr 28, 2017

I do not want to add another way of controlling this. I might be willing to add --ansi as an alias for --colors but that is as far as I am willing to go.


This comment has been minimized.

Copy link

jhasse commented Apr 28, 2017

What about the build server / continuous integration use case?

In an ideal future build servers could define this environment variable out of the box so that colors would just work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment