Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #26609 [Console] Fix check of color support on Windows (mlocati)
This PR was merged into the 2.7 branch. Discussion ---------- [Console] Fix check of color support on Windows | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | If the stream is redirected, `StreamOutput::hasColorSupport()` returns `false` on POSIX systems. On Windows, this is not always true. Before PHP 7.2 we can't say if the stream is redirected, but since PHP 7.2 we have the `stream_isatty` function that works on Windows too: let's use it. Sure, `sapi_windows_vt100_support` should return `false` if the stream is redirected, but it's in `or` with the other conditions, so the logic was flawed. Commits ------- f7f8189 Fix check of color support on Windows
- Loading branch information