Merge PSR-7 request and _GET/_POST parameters
[TASK] Merge PSR-7 request and _GET/_POST parameters
When hooks modify _GET or _POST parameters,
it is important that these changes reflect the PSR-7 request
for now, as long as TYPO3 access the _GET/_POST parameters
In order to move away from global access, we still want to avoid
places where it is unclear to use $_GET/$_POST vs.
$GLOBALS['TYPO3_REQUEST'] until all parts are completely
"global-scope free" for GET/POST parameters.
The change adds the initial GET/POST parameters to the
request object in the very first middleware of the frontend.
If these have been modified when the RequestHandler builds
up the content, they are added on top of the PSR-7 request object.
Additionally, if the PSR-7 request object has been modified,
these changes are put back in the global scope to reliably use
_GPmerged within Extbase and
Additionally, if _GET/_POST have been modified, a warning will
be shown in the TimeTracker to find out that there have been
Until then, it is safe to continue to access _GET/_POST within
Hooks and Frontend, however it is highly discouraged to modify
_GET/_POST directly as this functionality will be breaking in TYPO3 v10.0.
Bottom line: This safety net can now trigger deprecation warnings
if _GET/_POST have been modified during PSR-15 middleware hooks.
Bottom line 2: If these have been modified, they are put inside the
current request object.
Bottom line 3: If the request object has been modified, global state
will be modified ONCE in one place to ensure that we work with
the same object during the request phase.
Bottom line 4: We cannot get away from the current state of
running a TYPO3 Frontend Request from another source, and
we try to maintain compatibilty for legacy scripts for now. However,
this will be breaking in TYPO3 v10.0.
Reviewed-by: Andreas Fernandez <firstname.lastname@example.org>
Tested-by: TYPO3com <email@example.com>
Reviewed-by: Oliver Hader <firstname.lastname@example.org>
Tested-by: Oliver Hader <email@example.com>
Reviewed-by: Frank Naegler <firstname.lastname@example.org>
Tested-by: Frank Naegler <email@example.com>