Skip to content

symfony/console 6.4.24 cause printed <fg> on windows #61429

@samsonasik

Description

@samsonasik

Symfony version(s) affected

6.4.24

Description

Hi, we are using symfony/console on rectorphp, and after updating to symfony/console 6.4.24, the diff is broken, see issue

which the diff is broken

Image

while on symfony/console 6.4.23, it is working ok;

Image

How to reproduce

This only happen on windows, it can be reproduced in rector-src itself, try add $value = null on specific function, and run rector against it;

diff --git a/src/Application/ApplicationFileProcessor.php b/src/Application/ApplicationFileProcessor.php
index baeb38e22c..9e8d73a6ca 100644
--- a/src/Application/ApplicationFileProcessor.php
+++ b/src/Application/ApplicationFileProcessor.php
@@ -55,6 +55,7 @@ final class ApplicationFileProcessor
         private readonly MissConfigurationReporter $missConfigurationReporter,
         private readonly KaizenStepper $kaizenStepper
     ) {
+        $unused = null;
     }

and run:

composer update
bin/rector process src/Application/ApplicationFileProcessor.php --dry-run

it got:

Image

Possible Solution

we can pin to symfony/console 6.4.23 for now, but wondering if there is a fix can be in symfony/console itself.

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