Review main Merged

66948[TASK] Deprecate constants TYPO3_MODE and TYPO3_REQUESTTYPE

Christian Kuhn CR +2 V +2 Normal +233 −0 updated 12/01/20, 11:39

Commit message

Final patch to deprecate TYPO3_MODE and TYPO3_REQUESTTYPE
with an excessive changelog file to explain details and
migration for extension developers.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Daniel Goerz +1
    • Oli Bartsch +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Daniel Goerz +1
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 6

Files 3

Review log 1625

  1. Christian Kuhn uploaded patch set 1 11/30/20, 17:01

  2. Christian Kuhn updated the commit message in patch set 2 11/30/20, 17:02

  3. Christian Kuhn uploaded patch set 3 11/30/20, 17:04

  4. TYPO3com voted on patch set 1 V -1 11/30/20, 17:13 Completed build in 11m 51s on Mon, 30 Nov, 05:13 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7705

  5. TYPO3com voted on patch set 2 V -1 11/30/20, 17:16 Completed build in 13m 24s on Mon, 30 Nov, 05:16 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7706

  6. Christian Kuhn uploaded patch set 4 11/30/20, 17:19

  7. TYPO3com voted on patch set 3 V -1 11/30/20, 17:20 Completed build in 11m 10s on Mon, 30 Nov, 05:20 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7707

  8. Christian Kuhn uploaded patch set 5 11/30/20, 17:25

  9. TYPO3com voted on patch set 4 V +1 11/30/20, 17:31 Completed build in 12m 04s on Mon, 30 Nov, 05:31 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7708

  10. Christian Kuhn uploaded patch set 6 11/30/20, 17:37

  11. TYPO3com voted on patch set 5 V +1 11/30/20, 17:37 Completed build in 11m 58s on Mon, 30 Nov, 05:37 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7709

  12. TYPO3com voted on patch set 6 V +1 11/30/20, 17:50 Completed build in 12m 15s on Mon, 30 Nov, 05:50 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7712

  13. Christian Kuhn uploaded patch set 7 11/30/20, 17:52

  14. TYPO3com voted on patch set 7 V +1 11/30/20, 18:03 Completed build in 11m 41s on Mon, 30 Nov, 06:03 PM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7716

  15. Mathias Brodala commented on patch set 7 12/01/20, 08:38

    SystemEnvironmentBuilder.php:400

    "Http"

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:59

    It's unfortunate that this is seemingly inconsistent but I understand that Environment is set up way earlier and has no dependency on an application request. Still: would it make sense to have an "ApplicationType->isCli()" wrapper for consistency?

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:128

    "necessary switches depending on"

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:160

    handed

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:161

    Maybe "request handlers" instead?
  16. Christian Kuhn commented on patch set 7 12/01/20, 08:57

    SystemEnvironmentBuilder.php:400 Reply

    Done

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:59 Reply

    Good point. I stumbled there, too. The answer however is no ;) Reason: application and cli or not are different things: A process in either called from cli or http, this never changes. No matter how many calls to a frontend or backend are done in one process, if you're on cli, you'll stay there. This is why isCli() can be set up very early and is exposed via Environment::isCli() - Environment state does not change during calls to the same instance. The fact that TYPO3_REQUESTTYPE mixed cli and the application type into one constant was another bad thing about it.

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:128 Reply

    Done

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:160 Reply

    Done

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:161 Reply

    hmm. request handlers typically call the final controller and hand over the final request object that has been set up by the application and changed by middlewares. the request handler is basically the final middleware from this point of view.
  17. Christian Kuhn uploaded patch set 8 12/01/20, 08:57

  18. Mathias Brodala commented on patch set 8 12/01/20, 09:02

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:59 Reply

    You are right; the fact that the constants where on the same level probably leads to the impression that any new API should follow this approach. But as you mentioned, there is a vast and reasonable difference.

    Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:161 Reply

    OK, my impression is that controllers are request handlers, they get a request and return a response. If they implement RequestHandlerInterface or not depends on the implementation. Since you already mention the request handler separately from controller, this should be OK I guess.
  19. TYPO3com voted on patch set 8 V +1 12/01/20, 09:10 Completed build in 12m 27s on Tue, 1 Dec, 09:10 AM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7724

  20. Oli Bartsch uploaded patch set 9 12/01/20, 09:53

  21. Oli Bartsch voted on patch set 9 V +1 CR +1 12/01/20, 09:55

  22. TYPO3com voted on patch set 9 V +1 12/01/20, 10:05 Completed build in 11m 20s on Tue, 1 Dec, 10:05 AM Test Summary: 32404 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7727

  23. Daniel Goerz voted on patch set 9 V +1 CR +1 12/01/20, 11:06

  24. Christian Kuhn voted on patch set 9 V +2 CR +2 12/01/20, 11:39

  25. Christian Kuhn merged patch set 10 12/01/20, 11:39