10000 Symfony Console OutputFormatter replaces "<<" with "\" · Issue #18481 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Symfony Console OutputFormatter replaces "<<" with "\" #18481
Closed
@nualoy

Description

@nualoy

On a console command, with the standard OutputInterface instance
$output->writeln("<<");
actually outputs:

\

expected:

<<

The cause is the implementation of the method format in OutputFormatter, see line 177:

if (false !== strpos($output, '<<')) {
    return strtr($output, array('\\<' => '<', '<<' => '\\'));
}

Symfony version: 3.0.4

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

      0