Review main Merged

88565[BUGFIX] Correctly disable output buffering before a command is run

Helmut Hummel CR +2 V +2 Easy +2 −1 updated 03/11/25, 08:28

Commit message

TYPO3 Bootstrap currently always starts output buffering,
even on CLI. The latter is quite confusing
as it delays console output until the process is ended.

Symfony ConsoleOutput is not designed to work with this.

It can also lead to excessive memory consumption
for commands with heavy output that do not explicitly
end the output buffering before sending output.

Last but not least, the documented reason
for starting output buffering does not exist on CLI
(ensure AJAX output not corrupted with accidental output).

For the least impact, make sure the output buffering is
stopped before a command is run by using the correct PHP function
for that.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oliver Klee +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1115

  1. Helmut Hummel uploaded patch set 1 03/10/25, 20:43

  2. core-ci voted on patch set 1 V -1 03/10/25, 20:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75437

  3. Helmut Hummel uploaded patch set 2 V -1 03/10/25, 21:35

  4. core-ci voted on patch set 2 V +1 03/10/25, 21:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75439

  5. Oliver Klee updated the commit message in patch set 3 V +1 03/10/25, 22:33

  6. core-ci voted on patch set 3 V +1 03/10/25, 22:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75440

  7. Benjamin Franzke voted on patch set 3 CR +1 03/11/25, 07:47

  8. Benjamin Franzke commented on patch set 3 03/11/25, 07:52

    Bootstrap.php:82

    I fully support this for v14.0. Came to the same conclusion that `ob_start()` is to be avoided soon: > 86518: [BUGFIX] Allow dumping files larger than allowed memory size | https://review.typo3.org/c/Packages/TYPO3.CMS/+/86518 with this The current output buffer effectively means that we use twice the needed memory during `AbstractApplication::sendResponse()` (I disabled that for self emittable streams in that BUGFIX, but would love to do that globally)
  9. Benjamin Franzke voted on patch set 3 V +1 03/11/25, 07:57

  10. Benjamin Franzke uploaded patch set 4 CR +1 V +1 03/11/25, 07:59

  11. Oliver Klee voted on patch set 4 CR +1 03/11/25, 08:01

  12. Garvin Hicking voted on patch set 4 CR +1 V +1 03/11/25, 08:06

  13. core-ci voted on patch set 4 V +1 03/11/25, 08:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75455

  14. Benjamin Franzke voted on patch set 4 CR +2 V +2 03/11/25, 08:16

  15. Benjamin Franzke merged patch set 5 03/11/25, 08:28