Skip to content

Commit 0254811

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: fix merge [VarDumper] Test intl formatter broken since dumper does not replace the nnbsp character by standard space [WebProfilerBundle] Fix intercept external redirects [Webhook] Added missing XML attribute in config XSD [String] Skip a test when an issue is detected in PCRE2 [ExpressionLanguage] Fix null coalescing propagation [Mailer] Stop using the (local) AWS shared configuration in the PHPUnit tests. detect colors on not windows fix xterm detection refactor: hyper check Missing translations for Slovak (sk) #51954 Remove redundant PHPdoc line properly handle SYMFONY_DOTENV_VARS being the empty string Avoid incompatibility with symfony/console 7 bug #45057 [Messenger] Avoid reconnecting active Redis connections. [HttpKernel] Catch `TypeError` if the wrong type is used in `BackedEnumValueResolver` [Serializer] fix regression where nullable int cannot be serialized do not overwrite an application's default serialization context
2 parents a550a7c + ca73e92 commit 0254811

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Output/StreamOutput.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,17 @@ protected function hasColorSupport(): bool
9797
return false;
9898
}
9999

100-
if ('Hyper' === getenv('TERM_PROGRAM')) {
100+
if (\DIRECTORY_SEPARATOR === '\\'
101+
&& \function_exists('sapi_windows_vt100_support')
102+
&& @sapi_windows_vt100_support($this->stream)
103+
) {
101104
return true;
102105
}
103106

104-
if (\DIRECTORY_SEPARATOR === '\\') {
105-
return (\function_exists('sapi_windows_vt100_support')
106-
&& @sapi_windows_vt100_support($this->stream))
107-
|| false !== getenv('ANSICON')
108-
|| 'ON' === getenv('ConEmuANSI')
109-
|| 'xterm' === getenv('TERM');
110-
}
111-
112-
return stream_isatty($this->stream);
107+
return 'Hyper' === getenv('TERM_PROGRAM')
108+
|| false !== getenv('ANSICON')
109+
|| 'ON' === getenv('ConEmuANSI')
110+
|| str_starts_with((string) getenv('TERM'), 'xterm')
111+
|| stream_isatty($this->stream);
113112
}
114113
}

0 commit comments

Comments
 (0)