[!!!][TASK] Build strict PSR-15 middlewares 90/59490/6
authorBenni Mack <benni@typo3.org>
Fri, 18 Jan 2019 19:18:37 +0000 (20:18 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 7 Feb 2019 09:07:53 +0000 (10:07 +0100)
commit9618006aeeb7058c23cdfb1f5a9f01bd4d9958ed
tree468bfe46d36fa9f66be07902f99aa403766b6be9
parent0615ba7c26369fe36f06dc0d3f11be00d4b66c50
[!!!][TASK] Build strict PSR-15 middlewares

All PSR-15 middlewares now do not set the
$GLOBALS['TYPO3_REQUEST'] object anymore. Instead,
the RequestHandlers are using them for all
other logic (e.g. GP etc) where the request object
or any other attribute has not been handed in
yet.

It is now safe to say that PSR-7 request/response
objects have to be used within middlewares to
access or manipulate GET/POST data. Also,
the safety net for overriding GET/POST again
is still in place for FE (data = GP:id) in
order for existing TypoScript to work still,
until all other code gets global-free.

There are still places in TYPO3 Core where $TYPO3_REQUEST
is necessary (TypoScriptConditionMatcher, Error Handling)
which are added accordingly.

Resolves: #87661
Releases: master
Change-Id: Ibe499b6fda86ccd3abefcb3c8be294a7cb765d74
Reviewed-on: https://review.typo3.org/59490
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
13 files changed:
typo3/sysext/backend/Classes/Http/RequestHandler.php
typo3/sysext/backend/Classes/Middleware/SiteResolver.php
typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php
typo3/sysext/frontend/Classes/Middleware/PageResolver.php
typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php [deleted file]
typo3/sysext/frontend/Classes/Middleware/SiteResolver.php
typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php
typo3/sysext/frontend/Configuration/RequestMiddlewares.php
typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php