Skip to content

Color support detection warning with PHP 7.2 on Windows #26210

@ghost

Description

Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version dev

Color support detection emits a following warning when an unexpected type of stream (like php://memory) is passed to the method.

E_WARNING: sapi_windows_vt100_support() was not able to analyze the specified stream

I think that we can simply use a stfu operator for that case, since the native function returns false when this warning gets emitted, so the detection simply falls back to former behavior.

Also note, that polyfill for PHP < 7.2 does not reproduce this behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions