Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] use flag isDecorated instead of PHP_OS_FAMILY constant for checking terminal type#62813

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

Open
fperxas wants to merge1 commit intosymfony:6.4
base:6.4
Choose a base branch
Loading
fromfperxas:equiparate-os-family-terminal-to-hasColorSupport

Conversation

@fperxas
Copy link
Contributor

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#62514
LicenseMIT

OnSymfonyQuestionHelper use theisDecoratedFlag instead of the PHP_OS_FAMILY.@nicolas-grekas suggested to useStreamOutput::hasColorSupport(). As it is a protected method i thought we could use theOutputInterface::isDecorated flag which is constructed fromStreamOutput like this:$decorated ??= $this->hasColorSupport();

Please review if it is a correct decision :)

@carsonbotcarsonbot added this to the6.4 milestoneDec 18, 2025
@carsonbotcarsonbot changed the titleuse flag isDecorated instead of PHP_OS_FAMILY constant for checking terminal type use flag isDecorated instead of PHP_OS_FAMILY constant for checking terminal typeDec 18, 2025
@carsonbotcarsonbot changed the title use flag isDecorated instead of PHP_OS_FAMILY constant for checking terminal type[Console] use flag isDecorated instead of PHP_OS_FAMILY constant for checking terminal typeDec 18, 2025
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

did you try it locally? does it fix your issue?

privatefunctiongetEofShortcut(OutputInterface$output):string
{
if ('Windows' === \PHP_OS_FAMILY) {
if (!$output->isDecorated()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

we still need the check for windows (see test failures):

Suggested change
if (!$output->isDecorated()) {
if ('\\' === \DIRECTORY_SEPARATOR &&!$output->isDecorated()) {

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

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

4 participants

@fperxas@nicolas-grekas@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp