Review main Merged Breaking

94863[!!!][TASK] Remove implicit output buffering from Bootstrap

Benni Mack CR +2 V +2 Normal +80 −18 updated 07/31/26, 09:20

Commit message

TYPO3 Bootstrap always started an implicit output buffer as the
very first action, wrapping the entire bootstrap and request
lifecycle. It was meant to swallow accidental stray output (e.g.
warnings or echo/print from ext_localconf.php/ext_tables.php of
third-party extensions) so it would not corrupt AJAX responses or
file downloads. Output buffering on CLI was already disabled again
in a previous change, since it delayed console output until the
process ended and could bloat memory for heavy-output commands.

Since responses are already fully assembled as PSR-7 bodies before
being emitted, this legacy safety net is removed, along with the
now unused method Bootstrap::startOutputBuffering().

CommandApplication now drops any buffer level defensively (e.g. one
opened by third-party extension code during ext_localconf loading)
right before running a command, instead of relying on Bootstrap
having opened exactly one buffer to close.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1319

  1. Benni Mack uploaded patch set 1 07/21/26, 15:08

  2. core-ci voted on patch set 1 V -1 07/21/26, 15:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105107

  3. Stefan Bürk uploaded patch set 2 V -1 07/23/26, 16:45

  4. core-ci voted on patch set 2 V -1 07/23/26, 16:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105259

  5. Stefan Bürk uploaded patch set 3 V -1 07/23/26, 17:01

  6. core-ci voted on patch set 3 V +1 07/23/26, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105260

  7. Stefan Bürk uploaded patch set 4 V +1 07/23/26, 17:53

  8. core-ci voted on patch set 4 V +1 07/23/26, 18:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105263

  9. Stefan Bürk uploaded patch set 5 V +1 07/23/26, 18:17

  10. Stefan Bürk commented on patch set 5 07/23/26, 18:24

    The change does more than the subject advertises. Besides removing the output buffer it also (a) reorders `checkEncryptionKey()` relative to `ext_localconf` loading, (b) moves the `$GLOBALS['TCA']` assignment to after `TcaSchemaFactory::load()`, and (c) adds `declare(strict_types=1)` plus constructor-promotion / return-type hardening in `MiddlewareDispatcher`, `AbstractApplication` and `install/Classes/Http/Application`. The type-hardening is unrelated cleanup and would be much easier to review as its own [TASK]. At minimum the behaviour change in (a) needs a changelog paragraph.

    Bootstrap.php:150

    `checkEncryptionKey()` now runs *before* `ExtLocalconfFactory::load()`; before this change it ran afterwards (and after `$GLOBALS['TCA']` was populated). Installations that set `$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']` from `ext_localconf.php` — a real, if discouraged, deployment pattern — used to satisfy the check, but now hit the "TYPO3 Encryption Key is empty" exception before their `ext_localconf.php` is even loaded. That is a behaviour change beyond "remove output buffering" and is not covered by the changelog. Is the reordering intended? If so it deserves its own note in the Breaking changelog.

    Breaking-110250-RemovedImplicitOutputBufferingFromBootstrap.rst:64

    `NotScanned` undersells the removals here: three of the four removed methods are `public static`, and the "Affected installations" section explicitly says third-party / custom bootstrap scripts call them. `Bootstrap::populateLocalConfiguration` already has an ExtensionScanner matcher (`install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php:743`), but `startOutputBuffering()`, `baseSetup()` and `createConfigurationManager()` have none. Either add matchers for the three and drop `NotScanned`, or add a short justification for why they stay unscanned.
  11. core-ci voted on patch set 5 V +1 07/23/26, 18:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105264

  12. Benni Mack uploaded patch set 6 V +1 07/29/26, 09:28

  13. Benni Mack commented on patch set 6 07/29/26, 09:29

    This change is ready for review.

    Reply

    Done

    Bootstrap.php:150 Reply

    Done

    Breaking-110250-RemovedImplicitOutputBufferingFromBootstrap.rst:64 Reply

    Done
  14. core-ci voted on patch set 6 V +1 07/29/26, 09:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105577

  15. Stefan Bürk voted on patch set 6 CR +1 V +1 07/29/26, 10:01

  16. Jochen Roth voted on patch set 6 CR +1 V +1 07/29/26, 11:14

  17. Benni Mack voted on patch set 6 CR +2 V +2 07/29/26, 11:18

  18. Benni Mack merged patch set 7 07/29/26, 11:18

  19. Benjamin Franzke commented on patch set 7 07/31/26, 09:20

    Followup: > 91383: [TASK] Followup on output buffering removal | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91383