Skip to content

Is there a reason why AbstractCsv prints to terminal? #569

@4thguy

Description

@4thguy
Q A
Version 9.27.0

Question

Title basically, but in the download method there is a echo $chunk; inside the loop. It seems to have been introduced in a commit from ~4 months ago, so it might be an oversight.

Line:

csv/src/AbstractCsv.php

Lines 273 to 279 in e0b91a9

while (!$this->document->eof()) {
$chunk = $this->document->fread(8192);
false !== $chunk || throw new RuntimeException('Unable to read the document.');
$documentOutputLength += strlen($chunk);
echo $chunk;
flush();
}

Commit: 1cd1cd6

Checks before submitting

  • [ x ] Be sure that there isn't already an issue about this. See: Issues list
  • [ x ] Be sure that there isn't already a pull request about this. See: Pull requests
  • [ x ] I have read, searched and not found the information on the documentation website.
  • [ x ] I have read, searched and not found the information on PHP related forums and/or websites.
  • [ x ] This issue is about 1 question around the package with no business or domain specific logic related to a specific situation.
  • [ x ] The question has a descriptive title. For example: "Can I use the library with compressed CSV documents ?".

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions