Breaking: #110250 - Remove implicit output buffering from Bootstrap
See forge#110250
Description
The class
\TYPO3\ no longer wraps the entire
bootstrap and request lifecycle in an implicit output buffer via
ob_. This buffer was historically opened as the very first
action in
Bootstrap:: to swallow accidental stray output
(warnings, notices or stray
echo
/
print
statements, typically
from
ext_/
ext_ of third-party
extensions) so it would not corrupt AJAX responses or file downloads. On
CLI this buffering was already disabled again in a previous change, as it
delayed console output until the process ended and could bloat memory for
commands producing a lot of output.
Since responses are fully assembled as PSR-7 message bodies before being emitted, this legacy safety net is not needed anymore.
Along with it, the now unused method
Bootstrap:: has been removed.
Impact
Any stray output produced during bootstrap (for example from
ext_) is now sent to the client directly instead of
being silently discarded later on. This mainly affects binary/file
responses and AJAX requests, which relied on the buffer being cleaned
right before the response body was emitted.
Calling
Bootstrap:: now results in a fatal
PHP error (
Call to undefined method
).
Affected installations
TYPO3 installations with extensions that produce accidental output during
ext_/
ext_ loading, which so far was
silently swallowed, and installations with custom entry point scripts
calling
Bootstrap:: directly.
Migration
Remove any accidental output from
ext_ and
ext_ files. Extensions that need to suppress their own
output must manage output buffering (
ob_ /
ob_) themselves.
Remove calls to
Bootstrap:: and use
ob_ directly, if the behaviour is still required.