Review main Merged

64662[TASK] Avoid $GLOBALS[TYPO3_REQUEST] in TSFE

Benni Mack CR +2 V +2 Normal +52 −41 updated 06/05/20, 13:43

Commit message

In order to reduce the amount of accessing
globals in the future, and especially TYPO3_REQUEST
which was born because of missing structure
of TYPO3 Core, the currrent request object is now
handed in (optionally) to methods, to work directly
with them in TSFE context.

Review

  • Code review CR +2 Done
    • Frank Nägler +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Frank Nägler +2
    • Andreas Kienast +1
    • TYPO3com +1 CI

Issues 1

Files 4

Review log 912

  1. Benni Mack uploaded patch set 1 06/03/20, 15:02

  2. TYPO3com voted on patch set 1 V -1 06/03/20, 15:13 Completed build in 11m 09s on Wed, 3 Jun, 03:13 PM Test Summary: 24 of 73323 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3780

  3. Benni Mack uploaded patch set 2 06/03/20, 15:47

  4. TYPO3com voted on patch set 2 V +1 06/03/20, 15:58 Completed build in 11m 03s on Wed, 3 Jun, 03:58 PM Test Summary: 72835 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3781

  5. Benjamin Franzke commented on patch set 2 CR -1 06/04/20, 07:15

    +1 in general, just one slight remark.

    TypoScriptFrontendController.php:998

    We had $GLOBALS['TYPO3_REQUEST'] as requirement before, I think we should stick with that and not use ServerRequestFactory::fromGlobals(). That reads as if that is known/tests/expected state, which is not. I would opt to throw an exception if both $request and $GLOBALS['TYPO3_REQUEST'] are null.
  6. Benni Mack commented on patch set 2 06/04/20, 09:41

    TypoScriptFrontendController.php:998 Reply

    I would actually not throw an exception here (at least for TYPO3 v10) to ensure maximum compatibility. I will refine this code later-on in TYPO3 v11 (making the parameter a requirement for example) so this wouldn't be needed.
  7. Benjamin Franzke commented on patch set 2 CR +1 06/05/20, 12:39

    TypoScriptFrontendController.php:998 Reply

    Ok, fine by me if we'll remove these in v11 again.
  8. Andreas Kienast uploaded patch set 3 06/05/20, 13:27

  9. Andreas Kienast voted on patch set 3 V +1 CR +1 06/05/20, 13:27

  10. TYPO3com voted on patch set 3 V +1 06/05/20, 13:40 Completed build in 13m 27s on Fri, 5 Jun, 01:40 PM Test Summary: 72800 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3858

  11. Frank Nägler voted on patch set 3 V +2 CR +2 06/05/20, 13:43

  12. Frank Nägler merged patch set 4 06/05/20, 13:43