From 4ea922d09a270cf0e0e17d66d5a3ebbab8f38c74 Mon Sep 17 00:00:00 2001
From: Benni Mack <benni@typo3.org>
Date: Wed, 19 Dec 2018 16:56:44 +0100
Subject: [PATCH] [!!!][TASK] Remove deprecated frontend-related hooks and
 include scripts

The following hooks have been removed:
- $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser']
- $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc']
- $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']
- $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']
- $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']
- $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']

The class EidRequestHandler has been removed.

eID targets cannot include a scriptpath anymore:
- $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['my_eID'] = 'EXT:benni/Scripts/download.php';

Instead, they must contain a target (callable, class/method, function).

The various hooks are still in place in deprecated methods within TSFE which will be removed
in the next patch. Also, now hardly usable PSR-15 middlewares will be cleaned up separately
as well.

Resolves: #87220
Releases: master
Change-Id: Ic54af83c97f2e6d2fba4346e382240d0fac6a2dc
Reviewed-on: https://review.typo3.org/59217
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
---
 ...g-87193-DeprecatedFunctionalityRemoved.rst |  16 ++-
 .../TypoScriptFrontendController.php          |  17 +--
 .../Classes/Http/EidRequestHandler.php        | 116 ------------------
 .../frontend/Classes/Http/RequestHandler.php  |   4 -
 .../Middleware/BackendUserAuthenticator.php   |   9 --
 .../Classes/Middleware/EidHandler.php         |  25 +---
 .../Classes/Middleware/PageResolver.php       |  25 ----
 .../PrepareTypoScriptFrontendRendering.php    |  10 --
 .../Middleware/PreprocessRequestHook.php      |   9 --
 .../TypoScriptFrontendInitialization.php      |   9 --
 .../Php/ArrayDimensionMatcher.php             |   9 ++
 .../ExtensionScanner/Php/ClassNameMatcher.php |   1 +
 12 files changed, 32 insertions(+), 218 deletions(-)
 delete mode 100644 typo3/sysext/frontend/Classes/Http/EidRequestHandler.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
index 346745e40e0e..6ca5caf63d45 100644
--- a/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
+++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
@@ -29,6 +29,7 @@ The following PHP classes that have been previously deprecated for v9 have been
 * :php:`TYPO3\CMS\Core\Resource\Utility\BackendUtility`
 * :php:`TYPO3\CMS\Core\Utility\ClientUtility`
 * :php:`TYPO3\CMS\Core\Utility\PhpOptionsUtility`
+* :php:`TYPO3\CMS\Frontend\Http\EidRequestHandler`
 * :php:`TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController`
 * :php:`TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList`
 * :php:`TYPO3\CMS\Workspaces\Service\AutoPublishService`
@@ -311,14 +312,27 @@ The following global variables have been removed:
 * :php:`$GLOBALS['TYPO3_LOADED_EXT']`
 
 
+The following hooks have been removed:
+
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser']`
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc']`
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']`
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']`
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']`
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']`
+
+
 The following feature is now always enabled:
 
 * :php:`simplifiedControllerActionDispatching` - Backend controller actions do not receive a prepared response object anymore
 
 
-The following feature has been removed:
+The following features have been removed:
 
 * Migration from v4 to v5 PackagesStates.php
+* `eID` script targets cannot define a script path anymore:
+  `$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['my_eID'] = 'EXT:benni/Scripts/download.php'` will not work anymore.
+  Instead, they must contain a target (callable, class/method, function).
 
 
 Impact
diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
index 370f1fc9200c..d5fc4716f23d 100644
--- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
+++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
@@ -4194,23 +4194,10 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      * Outputs preview info.
      *
      * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Use "hook_eofe" instead.
-     * @param bool $isCoreCall if set to true, there will be no deprecation message.
      */
-    public function previewInfo($isCoreCall = false)
+    public function previewInfo()
     {
-        if (!$isCoreCall) {
-            trigger_error('$TSFE->previewInfo() will be removed in TYPO3 v10.0, as this is now called by the Frontend RequestHandler.', E_USER_DEPRECATED);
-        } elseif (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'])) {
-            trigger_error('The hook "hook_previewInfo" will be removed in TYPO3 v10.0, but is still in use. Use "hook_eofe" instead.', E_USER_DEPRECATED);
-        }
-        if ($this->fePreview !== 0) {
-            $previewInfo = '';
-            $_params = ['pObj' => &$this];
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo'] ?? [] as $_funcRef) {
-                $previewInfo .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
-            }
-            $this->content = str_ireplace('</body>', $previewInfo . '</body>', $this->content);
-        }
+        trigger_error('$TSFE->previewInfo() will be removed in TYPO3 v10.0, as this is now called by the Frontend RequestHandler.', E_USER_DEPRECATED);
     }
 
     /**
diff --git a/typo3/sysext/frontend/Classes/Http/EidRequestHandler.php b/typo3/sysext/frontend/Classes/Http/EidRequestHandler.php
deleted file mode 100644
index b383c348edf1..000000000000
--- a/typo3/sysext/frontend/Classes/Http/EidRequestHandler.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-declare(strict_types = 1);
-namespace TYPO3\CMS\Frontend\Http;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\ServerRequestInterface;
-use Psr\Http\Server\RequestHandlerInterface as PsrRequestHandlerInterface;
-use TYPO3\CMS\Core\Exception;
-use TYPO3\CMS\Core\Http\Dispatcher;
-use TYPO3\CMS\Core\Http\NullResponse;
-use TYPO3\CMS\Core\Http\RequestHandlerInterface;
-use TYPO3\CMS\Core\Http\Response;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Middleware\EidHandler as EidMiddleware;
-
-/**
- * Lightweight alternative to the regular RequestHandler used when $_GET[eID] is set.
- * In the future, logic from the EidUtility will be moved to this class.
- *
- * @deprecated since TYPO3 v9.2, will be removed in TYPO3 v10.0
- */
-class EidRequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterface
-{
-    /**
-     * Constructor handing over the bootstrap and the original request
-     */
-    public function __construct()
-    {
-        trigger_error(self::class . ' will be removed in TYPO3 v10.0. Use ' . EidMiddleware::class . ' instead.', E_USER_DEPRECATED);
-    }
-
-    /**
-     * Handles a frontend request based on the _GP "eID" variable.
-     *
-     * @param ServerRequestInterface $request
-     * @return ResponseInterface
-     */
-    public function handleRequest(ServerRequestInterface $request): ResponseInterface
-    {
-        trigger_error(self::class . ' will be removed in TYPO3 v10.0. Use ' . EidMiddleware::class . ' instead.', E_USER_DEPRECATED);
-        return $this->handle($request);
-    }
-
-    /**
-     * This request handler can handle any frontend request.
-     *
-     * @param ServerRequestInterface $request The request to process
-     * @return bool If the request is not an eID request, TRUE otherwise FALSE
-     */
-    public function canHandleRequest(ServerRequestInterface $request): bool
-    {
-        trigger_error(self::class . ' will be removed in TYPO3 v10.0. Use ' . EidMiddleware::class . ' instead.', E_USER_DEPRECATED);
-        return !empty($request->getQueryParams()['eID']) || !empty($request->getParsedBody()['eID']);
-    }
-
-    /**
-     * Returns the priority - how eager the handler is to actually handle the
-     * request.
-     *
-     * @return int The priority of the request handler.
-     */
-    public function getPriority(): int
-    {
-        trigger_error(self::class . ' will be removed in TYPO3 v10.0. Use ' . EidMiddleware::class . ' instead.', E_USER_DEPRECATED);
-        return 80;
-    }
-
-    /**
-     * Dispatches the request to the corresponding eID class or eID script
-     *
-     * @param ServerRequestInterface $request
-     * @return ResponseInterface
-     * @throws Exception
-     */
-    public function handle(ServerRequestInterface $request): ResponseInterface
-    {
-        trigger_error(self::class . ' will be removed in TYPO3 v10.0. Use ' . EidMiddleware::class . ' instead.', E_USER_DEPRECATED);
-        // Remove any output produced until now
-        ob_clean();
-
-        $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? '';
-
-        if (empty($eID) || !isset($GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include'][$eID])) {
-            return (new Response())->withStatus(404, 'eID not registered');
-        }
-
-        $configuration = $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include'][$eID];
-
-        // Simple check to make sure that it's not an absolute file (to use the fallback)
-        if (strpos($configuration, '::') !== false || is_callable($configuration)) {
-            $dispatcher = GeneralUtility::makeInstance(Dispatcher::class);
-            $request = $request->withAttribute('target', $configuration);
-            return $dispatcher->dispatch($request);
-        }
-
-        $scriptPath = GeneralUtility::getFileAbsFileName($configuration);
-        if ($scriptPath === '') {
-            throw new Exception('Registered eID has invalid script path.', 1416391467);
-        }
-        include $scriptPath;
-        return new NullResponse();
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
index c7ed4cd2c613..ced0974a84d3 100644
--- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php
+++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php
@@ -215,10 +215,6 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
             $response = $response->withHeader('X-TYPO3-Parsetime', $this->timeTracker->getParseTime() . 'ms');
         }
 
-        // Preview info
-        // @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0.
-        $controller->previewInfo(true);
-
         // Hook for "end-of-frontend"
         $_params = ['pObj' => &$controller];
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'] ?? [] as $_funcRef) {
diff --git a/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
index a48ef99542ad..13b80900a9d4 100644
--- a/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
+++ b/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
@@ -52,15 +52,6 @@ class BackendUserAuthenticator implements MiddlewareInterface
      */
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
     {
-        // PRE BE_USER HOOK
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'])) {
-            trigger_error('The "preBeUser" 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/index_ts.php']['preBeUser'] as $_funcRef) {
-                $_params = [];
-                GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']);
-            }
-        }
-
         // Initializing a possible logged-in Backend User
         // If the backend cookie is set,
         // we proceed and check if a backend user is logged in.
diff --git a/typo3/sysext/frontend/Classes/Middleware/EidHandler.php b/typo3/sysext/frontend/Classes/Middleware/EidHandler.php
index dd4c1a3061f0..bf8c568e9364 100644
--- a/typo3/sysext/frontend/Classes/Middleware/EidHandler.php
+++ b/typo3/sysext/frontend/Classes/Middleware/EidHandler.php
@@ -53,28 +53,13 @@ class EidHandler implements MiddlewareInterface
         // Remove any output produced until now
         ob_clean();
 
-        if (empty($eID) || !isset($GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include'][$eID])) {
+        $target = $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include'][$eID] ?? null;
+        if (empty($target)) {
             return (new Response())->withStatus(404, 'eID not registered');
         }
 
-        $configuration = $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include'][$eID];
-
-        // Simple check to make sure that it's not an absolute file (to use the fallback)
-        if (strpos($configuration, '::') !== false || is_callable($configuration)) {
-            $dispatcher = GeneralUtility::makeInstance(Dispatcher::class);
-            $request = $request->withAttribute('target', $configuration);
-            return $dispatcher->dispatch($request) ?? new NullResponse();
-        }
-        trigger_error(
-            'eID "' . $eID . '" is registered with a script to a file. This behaviour will be removed in TYPO3 v10.0.'
-            . ' Register eID with a class::method syntax like "\MyVendor\MyExtension\Controller\MyEidController::myMethod" instead.',
-            E_USER_DEPRECATED
-        );
-        $scriptPath = GeneralUtility::getFileAbsFileName($configuration);
-        if ($scriptPath === '') {
-            throw new Exception('Registered eID has invalid script path.', 1518042216);
-        }
-        include $scriptPath;
-        return new NullResponse();
+        $dispatcher = GeneralUtility::makeInstance(Dispatcher::class);
+        $request = $request->withAttribute('target', $target);
+        return $dispatcher->dispatch($request) ?? new NullResponse();
     }
 }
diff --git a/typo3/sysext/frontend/Classes/Middleware/PageResolver.php b/typo3/sysext/frontend/Classes/Middleware/PageResolver.php
index 6e8787ee4a65..f99baf705660 100644
--- a/typo3/sysext/frontend/Classes/Middleware/PageResolver.php
+++ b/typo3/sysext/frontend/Classes/Middleware/PageResolver.php
@@ -140,10 +140,6 @@ class PageResolver implements MiddlewareInterface
         } else {
             // old-school page resolving for realurl, cooluri etc.
             $this->controller->siteScript = $request->getAttribute('normalizedParams')->getSiteScript();
-            if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'])) {
-                trigger_error('The "checkAlternativeIdMethods-PostProc" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED);
-                $this->checkAlternativeIdMethods($this->controller);
-            }
         }
 
         $this->controller->determineId();
@@ -153,33 +149,12 @@ class PageResolver implements MiddlewareInterface
             unset($GLOBALS['BE_USER']);
             // Register an empty backend user as aspect
             $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), null);
-            if (!$hasSiteConfiguration) {
-                $this->checkAlternativeIdMethods($this->controller);
-            }
             $this->controller->determineId();
         }
 
         return $handler->handle($request);
     }
 
-    /**
-     * Provides ways to bypass the '?id=[xxx]&type=[xx]' format, using either PATH_INFO or Server Rewrites
-     *
-     * Two options:
-     * 1) Use PATH_INFO (also Apache) to extract id and type from that var. Does not require any special modules compiled with apache. (less typical)
-     * 2) Using hook which enables features like those provided from "realurl" extension (AKA "Speaking URLs")
-     *
-     * @param TypoScriptFrontendController $tsfe
-     */
-    protected function checkAlternativeIdMethods(TypoScriptFrontendController $tsfe)
-    {
-        // Call post processing function for custom URL methods.
-        $_params = ['pObj' => &$tsfe];
-        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'] ?? [] as $_funcRef) {
-            GeneralUtility::callUserFunction($_funcRef, $_params, $tsfe);
-        }
-    }
-
     /**
      * @param string $pageId
      * @return array|null
diff --git a/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php b/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
index b419c737d873..eab6c9e7f538 100644
--- a/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
+++ b/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php
@@ -105,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);
     }
 
diff --git a/typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php b/typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php
index c2e49dbfa8bf..9f224788b90a 100644
--- a/typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php
+++ b/typo3/sysext/frontend/Classes/Middleware/PreprocessRequestHook.php
@@ -19,7 +19,6 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Calls a hook before processing a request for the TYPO3 Frontend.
@@ -46,14 +45,6 @@ class PreprocessRequestHook implements MiddlewareInterface
         if ($request->getMethod() === 'POST') {
             $request = $request->withAttribute('_originalPostParameters', $_POST);
         }
-        // Set original parameters
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'])) {
-            trigger_error('The "preprocessRequest" 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/index_ts.php']['preprocessRequest'] as $hookFunction) {
-                $hookParameters = [];
-                GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters);
-            }
-        }
         return $handler->handle($request);
     }
 }
diff --git a/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php b/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php
index 11b1f7a61b2c..b83d686a5712 100644
--- a/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php
+++ b/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php
@@ -79,15 +79,6 @@ class TypoScriptFrontendInitialization implements MiddlewareInterface, LoggerAwa
                 throw new ServiceUnavailableException($message, 1526013723);
             }
         }
-        // Call post processing function for DB connection:
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'])) {
-            trigger_error('The "connectToDB" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED);
-            $_params = ['pObj' => &$GLOBALS['TSFE']];
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'] as $_funcRef) {
-                GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']);
-            }
-        }
-
         return $handler->handle($request);
     }
 }
diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
index 04ce557f53cc..cd8c31dfc1e6 100644
--- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
+++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
@@ -174,6 +174,7 @@ return [
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_fe.php\'][\'hook_previewInfo\']' => [
         'restFiles' => [
             'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'extbase\'][\'commandControllers\']' => [
@@ -184,41 +185,49 @@ return [
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_fe.php\'][\'tslib_fe-PostProc\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_fe.php\'][\'connectToDB\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_fe.php\'][\'initFEuser\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/index_ts.php\'][\'preBeUser\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/index_ts.php\'][\'postBeUser\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_fe.php\'][\'checkAlternativeIdMethods-PostProc\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/index_ts.php\'][\'preprocessRequest\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_fe.php\'][\'checkDataSubmission\']' => [
         'restFiles' => [
             'Deprecation-86279-VariousHooksAndPSR-15Middlewares.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
 ];
diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
index 7a1ee7a6bedf..e78dc1dd7377 100644
--- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
+++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
@@ -115,6 +115,7 @@ return [
     'TYPO3\CMS\Frontend\Http\EidRequestHandler' => [
         'restFiles' => [
             'Deprecation-83803-DeprecateEidRequestHandler.rst',
+            'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
     'TYPO3\CMS\Backend\Http\AjaxRequestHandler' => [
-- 
GitLab