Skip to content
  • Benni Mack's avatar
    [TASK] Merge PSR-7 request and _GET/_POST parameters · a4ae5ffe
    Benni Mack authored and Frank Nägler's avatar Frank Nägler committed
    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
    via GeneralUtility::_GP().
    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.
    Resolves: #86458
    Releases: master
    Change-Id: Ic8f4f123bb5ea0d660e500494cf06a965dea03c4
    Reviewed-by: default avatarAndreas Fernandez <>
    Tested-by: default avatarTYPO3com <>
    Reviewed-by: default avatarOliver Hader <>
    Tested-by: default avatarOliver Hader <>
    Reviewed-by: default avatarFrank Naegler <>
    Tested-by: default avatarFrank Naegler <>