[!!!][TASK] Remove deprecated frontend-related hooks and include scripts
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Middleware / PrepareTypoScriptFrontendRendering.php
index 7987b93..eab6c9e 100644 (file)
@@ -77,6 +77,7 @@ class PrepareTypoScriptFrontendRendering implements MiddlewareInterface
             $modifiedGetVars = GeneralUtility::removeDotsFromTS($this->controller->config['config']['defaultGetVars.']);
             if ($pageArguments instanceof PageArguments) {
                 $pageArguments = $pageArguments->withQueryArguments($modifiedGetVars);
+                $this->controller->setPageArguments($pageArguments);
                 $request = $request->withAttribute('routing', $pageArguments);
             }
             if (!empty($request->getQueryParams())) {
@@ -85,12 +86,6 @@ class PrepareTypoScriptFrontendRendering implements MiddlewareInterface
             $request = $request->withQueryParams($modifiedGetVars);
             $GLOBALS['TYPO3_REQUEST'] = $request;
         }
-        // Populate internal route query arguments to super global $_GET
-        if ($pageArguments instanceof PageArguments) {
-            $_GET = $pageArguments->getArguments();
-            $GLOBALS['HTTP_GET_VARS'] = $pageArguments->getArguments();
-            $this->controller->setPageArguments($pageArguments);
-        }
 
         // Setting language and locale
         $this->timeTracker->push('Setting language and locale');
@@ -110,16 +105,6 @@ class PrepareTypoScriptFrontendRendering implements MiddlewareInterface
 
         // @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0
         $this->controller->initializeRedirectUrlHandlers(true);
-
-        // Hook for processing data submission to extensions
-        // This is done at this point, because we need the config values
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'])) {
-            trigger_error('The "checkDataSubmission" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED);
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'] as $className) {
-                GeneralUtility::makeInstance($className)->checkDataSubmission($this->controller);
-            }
-        }
-
         return $handler->handle($request);
     }