Skip to content

Dump doesn't work with console application #29765

@elanmailerag

Description

@elanmailerag

Symfony version: 4.2.0

Description
I called my command from a Controller as written in documentation here . And I used dump function.
But for some reason there's no output, dump is not working. And if I'd use print_r or var_dump they work fine. If I use dump before running application, it works fine.

How to reproduce

    $application = new Application($kernel);
    $application->setAutoExit(false);

    $input = new ArrayInput([
        'command' => 'about',
    ]);

    $output = new BufferedOutput();

    $application->run($input, $output);

    $content = $output->fetch();

    dump($content); // doesn't work

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