diff --git a/src/Command/FixerApplication.php b/src/Command/FixerApplication.php index 987f2172bd..bc6e93159f 100644 --- a/src/Command/FixerApplication.php +++ b/src/Command/FixerApplication.php @@ -372,12 +372,10 @@ private function downloadPhar( $progressBar->setMessage(sprintf('%.2f MB', $totalSize / 1000000), 'fileSize'); $progressBar->start($totalSize); - $destination = new \React\Stream\WritableResourceStream($pharPathResource, $loop); - $body->pipe($destination); - $bytes = 0; - $body->on('data', static function ($chunk) use ($progressBar, &$bytes): void { + $body->on('data', static function ($chunk) use ($pharPathResource, $progressBar, &$bytes): void { $bytes += strlen($chunk); + fwrite($pharPathResource, $chunk); $progressBar->setProgress($bytes); }); });