From e81ae500143b0d5a54190a3cd83a628d4d66b94d Mon Sep 17 00:00:00 2001 From: Benni Mack Date: Wed, 1 Aug 2018 17:10:10 +0200 Subject: [PATCH] [TASK] Deprecate LoginFramesetController The class LoginFramesetController just does a simple frameset and has been replaced by using `index.php?loginRefresh=1` directly. Resolves: #85707 Related: #84368 Releases: master Change-Id: Iaa4457ed9617d47a1551326125ed2c737f3bd34a Reviewed-on: https://review.typo3.org/57756 Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters Tested-by: TYPO3com Reviewed-by: Tymoteusz Motylewski Tested-by: Tymoteusz Motylewski --- .../Controller/LoginFramesetController.php | 6 +-- ...AndPropertiesInLoginFramesetController.rst | 41 ------------------- ...recation-85707-LoginFramesetController.rst | 35 ++++++++++++++++ .../ExtensionScanner/Php/ClassNameMatcher.php | 5 +++ 4 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 typo3/sysext/core/Documentation/Changelog/9.2/Deprecation-84368-ProtectedMethodsAndPropertiesInLoginFramesetController.rst create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Deprecation-85707-LoginFramesetController.rst diff --git a/typo3/sysext/backend/Classes/Controller/LoginFramesetController.php b/typo3/sysext/backend/Classes/Controller/LoginFramesetController.php index a11998915f4c..06edd8f637d6 100644 --- a/typo3/sysext/backend/Classes/Controller/LoginFramesetController.php +++ b/typo3/sysext/backend/Classes/Controller/LoginFramesetController.php @@ -25,6 +25,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Script Class, putting the frameset together. + * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. All logic is moved into LoginController. */ class LoginFramesetController { @@ -38,6 +39,7 @@ class LoginFramesetController */ public function __construct() { + trigger_error(__CLASS__ . ' will be removed in TYPO3 v10.0. Request "index.php?loginRefresh=1" directly to work without the frameset.', E_USER_DEPRECATED); $GLOBALS['SOBE'] = $this; } @@ -53,15 +55,13 @@ class LoginFramesetController $this->createFrameset(); return new HtmlResponse($this->content); } + /** * Main function. * Creates the header code and the frameset for the two frames. - * - * @deprecated since v9, will be removed in v10 */ public function main() { - trigger_error('Method main() will be replaced by protected method createFrameset() in v10. Do not call from other extension', E_USER_DEPRECATED); $this->createFrameset(); } /** diff --git a/typo3/sysext/core/Documentation/Changelog/9.2/Deprecation-84368-ProtectedMethodsAndPropertiesInLoginFramesetController.rst b/typo3/sysext/core/Documentation/Changelog/9.2/Deprecation-84368-ProtectedMethodsAndPropertiesInLoginFramesetController.rst deleted file mode 100644 index a699375b485a..000000000000 --- a/typo3/sysext/core/Documentation/Changelog/9.2/Deprecation-84368-ProtectedMethodsAndPropertiesInLoginFramesetController.rst +++ /dev/null @@ -1,41 +0,0 @@ -.. include:: ../../Includes.txt - -================================================================================= -Deprecation: #84368 - Protected methods and properties in LoginFramesetController -================================================================================= - -See :issue:`84368` - -Description -=========== - -This file is about third party usage (consumer that call the class as well as -signals or hooks depending on it) of :php:`TYPO3\CMS\Backend\Controller\LoginFramesetController`. - -All methods not used as entry points by :php:`TYPO3\CMS\Backend\Http\RouteDispatcher` will be -removed or set to protected in v10 and throw deprecation warnings if used from a third party: - -* [not scanned] :php:`main()` - - -Impact -====== - -Calling above method on an instance of :php:`LoginFramesetController` will throw a deprecation warning in v9 and a PHP fatal in v10. - - -Affected Installations -====================== - -The extension scanner will find all usages, but may also find some false positives. In general all extensions -that set properties or call methods except :php:`mainAction()` are affected. - - -Migration -========= - -In general, extensions should not instantiate and re-use controllers of the core. Existing -usages should be rewritten to be free of calls like these. - - -.. index:: Backend, PHP-API, PartiallyScanned diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85707-LoginFramesetController.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85707-LoginFramesetController.rst new file mode 100644 index 000000000000..2fc49056984a --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85707-LoginFramesetController.rst @@ -0,0 +1,35 @@ +.. include:: ../../Includes.txt + +============================================= +Deprecation: #85707 - LoginFramesetController +============================================= + +See :issue:`85707` + +Description +=========== + +The class :php:`TYPO3\CMS\Backend\Controller\LoginFramesetController` builds a simple HTML frameset +and has been replaced by using the full logic within :php:`LoginController` or a request to +`index.php?loginRefresh=1` directly. + + +Impact +====== + +Instantiating the LoginFramesetController class will trigger a deprecation message. + + +Affected Installations +====================== + +TYPO3 installations with custom logic using the rare functionality of LoginFramesetController. + + +Migration +========= + +Reference `index.php?loginRefresh=1` in the callers code directly, or re-implement the frameset if +necessary. + +.. index:: Backend, FullyScanned, ext:backend \ No newline at end of file diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php index 348ed36ceb41..332dd7e243f7 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php @@ -699,4 +699,9 @@ return [ 'Deprecation-85687-DeprecateRuntimeCacheWriter.rst', ], ], + 'TYPO3\CMS\Backend\Controller\LoginFramesetController' => [ + 'restFiles' => [ + 'Deprecation-85707-LoginFramesetController.rst', + ], + ], ]; -- 2.20.1