66948[TASK] Deprecate constants TYPO3_MODE and TYPO3_REQUESTTYPE
Commit message
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
-
Christian Kuhn uploaded patch set 1 11/30/20, 17:01
-
Christian Kuhn updated the commit message in patch set 2 11/30/20, 17:02
-
Christian Kuhn uploaded patch set 3 11/30/20, 17:04
-
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
-
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
-
Christian Kuhn uploaded patch set 4 11/30/20, 17:19
-
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
-
Christian Kuhn uploaded patch set 5 11/30/20, 17:25
-
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
-
Christian Kuhn uploaded patch set 6 11/30/20, 17:37
-
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
-
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
-
Christian Kuhn uploaded patch set 7 11/30/20, 17:52
-
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
-
Mathias Brodala commented on patch set 7 12/01/20, 08:38
Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:59It'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:160handedDeprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:161Maybe "request handlers" instead? -
Christian Kuhn commented on patch set 7 12/01/20, 08:57
SystemEnvironmentBuilder.php:400ReplyDoneDeprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:59ReplyGood 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:128ReplyDoneDeprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:160ReplyDoneDeprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:161Replyhmm. 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. -
Christian Kuhn uploaded patch set 8 12/01/20, 08:57
-
Mathias Brodala commented on patch set 8 12/01/20, 09:02
Deprecation-92947-DeprecateTYPO3_MODEAndTYPO3_REQUESTTYPEConstants.rst:59ReplyYou 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:161ReplyOK, 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. -
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
-
Oli Bartsch uploaded patch set 9 12/01/20, 09:53
-
Oli Bartsch voted on patch set 9 V +1 CR +1 12/01/20, 09:55
-
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
-
Daniel Goerz voted on patch set 9 V +1 CR +1 12/01/20, 11:06
-
Christian Kuhn voted on patch set 9 V +2 CR +2 12/01/20, 11:39
-
Christian Kuhn merged patch set 10 12/01/20, 11:39
SystemEnvironmentBuilder.php:400