Skip to content

Color support detectiong change in 6.3.11 introduced a regression #53460

@mxr576

Description

@mxr576

Symfony version(s) affected

6.3.11

Description

See steps the reproduce.

How to reproduce

I have a custom KISS e2e test script for testing composer audit command outputs.

It looks like the color support detection change that was introduced in 6.3.11 introduced a regression and the output of composer audit --format=json become colorized that makes the JSON invalid.

$audit_output = $argv[1] ?? (stream_get_contents(STDIN) ?: null);
if (null === $audit_output) {
    throw new \LogicException('Missing "composer audit" command output.');
}


fwrite(STDERR, $audit_output);


try {
    $audit_result = json_decode($audit_output, true, flags: JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
    throw new \LogicException(sprintf('Malformed JSON input: "%s". %s', base64_encode(gzdeflate($audit_output, 9)), $e->getMessage()), 0, $e);
}

(Source: https://github.com/mxr576/ddqg-composer-audit/blob/1.0.0-rc4/tests/fixtures/e2e/test.php#L18-L29)

tests/fixtures/e2e/test.php "$(DDQG_COMPOSER_AUDIT_TEST_ENV=1 ./vendor/bin/composer -d tests/fixtures/e2e audit --format=json)"

(Source: https://github.com/mxr576/ddqg-composer-audit/blob/1.0.0-rc4/.github/workflows/run-e2e-test.yml#L51)

Possible Solution

No response

Additional Context

No response

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy