[!!!][TASK] Remove leftover deprecated hooks 64/59364/5
authorBenni Mack <benni@typo3.org>
Mon, 7 Jan 2019 20:14:34 +0000 (21:14 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 7 Jan 2019 20:48:58 +0000 (21:48 +0100)
Due to testing framework refactoring, the 2 leftover hooks
in Frontend middlewares can now be removed:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser']
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser']

Thus, Frontend Middleware stack is now free of hooks.

Resolves: #87357
Releases: master
Change-Id: I076d9f4aa556f4ba111196449eee6449ba8036db
Reviewed-on: https://review.typo3.org/59364
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php

index fa6d2bf..51a72ce 100644 (file)
@@ -1027,16 +1027,17 @@ The following global variables have been removed:
 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/index_ts.php']['postBeUser']`
 * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']`
 * :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/class.tslib_fe.php']['connectToDB']`
+* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser']`
 * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']`
 * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc']`
 * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc']`
 * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksRte_PostProc']`
 
-
 The following feature is now always enabled:
 
 * Extbase's :php:`consistentTranslationOverlayHandling` - Translations in Extbase are now always consistent
index 13b8090..cebd558 100644 (file)
@@ -59,20 +59,7 @@ class BackendUserAuthenticator implements MiddlewareInterface
         if (isset($request->getCookieParams()[BackendUserAuthentication::getCookieName()])) {
             $backendUserObject = $this->initializeBackendUser($request);
         }
-
         $GLOBALS['BE_USER'] = $backendUserObject;
-
-        // POST BE_USER HOOK
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'])) {
-            $_params = [
-                'BE_USER' => &$GLOBALS['BE_USER']
-            ];
-            trigger_error('The "postBeUser" 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']['postBeUser'] as $_funcRef) {
-                GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']);
-            }
-        }
-
         // Load specific dependencies which are necessary for a valid Backend User
         // like $GLOBALS['LANG'] for labels in the language of the BE User, the router, and ext_tables.php for all modules
         // So things like Frontend Editing and Admin Panel can use this for generating links to the TYPO3 Backend.
index 0260374..a5f35fe 100644 (file)
@@ -62,17 +62,6 @@ class FrontendUserAuthenticator implements MiddlewareInterface
         // Keep the backwards-compatibility for TYPO3 v9, to have the fe_user within the global TSFE object
         $GLOBALS['TSFE']->fe_user = $frontendUser;
 
-        // Call hook for possible manipulation of frontend user object
-        // This hook is kept for compatibility reasons, however, it should be fairly simple to add a custom middleware
-        // for this purpose
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'])) {
-            trigger_error('The "initFEuser" 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']['initFEuser'] as $_funcRef) {
-                GeneralUtility::callUserFunction($_funcRef, $_params, $GLOBALS['TSFE']);
-            }
-        }
-
         // Register the frontend user as aspect
         $this->setFrontendUserAspect(GeneralUtility::makeInstance(Context::class), $frontendUser);