Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Component/Console/Output/BufferedOutput buffer memory overflow #39156

Copy link
Copy link
Closed
@wenjy

Description

@wenjy
Issue body actions

protected function doWrite(string $message, bool $newline)

see laravel issue: laravel/framework#35340

Steps To Reproduce:

use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Style\SymfonyStyle;

include __DIR__ . "/../vendor/autoload.php";

$input = new StringInput('test');
$output = new ConsoleOutput();

$style = new SymfonyStyle($input, $output);

$str = 'teststr';
$num = 26843546;//(128 << 20) / 5; "tstr\r\n"  php memory 128M

for ($i =0;$i<$num;$i++) {
    $style->writeln($str);
}

echo 'success';

PR: #26863

Need to call bufferedOutput->fetch

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.