diff --git a/composer.json b/composer.json index c7f27a03990f6e64fb890a13f9d1a0db86dcea64..d987be06496390e7060baa04f93d380dfd851f14 100644 --- a/composer.json +++ b/composer.json @@ -70,6 +70,7 @@ "typo3/class-alias-loader": { "always-add-alias-loader": true, "class-alias-maps": [ + "typo3/sysext/backend/Migrations/Code/ClassAliasMap.php", "typo3/sysext/core/Migrations/Code/ClassAliasMap.php", "typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php", "typo3/sysext/extbase/Migrations/Code/ClassAliasMap.php", diff --git a/composer.lock b/composer.lock index 3170386e98544d236d8152ec76aa8d3a55c65694..499465fd4d542e8ffeefb2b5abda1b52908a5a36 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "39981f9ff5c2b39ddf83a87ac8fc5d15", + "content-hash": "0e757db5e2ea6409800d3e505af4f744", "packages": [ { "name": "cogpowered/finediff", diff --git a/typo3/sysext/backend/Classes/AjaxLoginHandler.php b/typo3/sysext/backend/Classes/Controller/AjaxLoginController.php similarity index 98% rename from typo3/sysext/backend/Classes/AjaxLoginHandler.php rename to typo3/sysext/backend/Classes/Controller/AjaxLoginController.php index 46c0aca5d22d2e278a9d9c43df9c96b4a147fd97..6cddf77798789da79e934e4995ed5835fd904610 100644 --- a/typo3/sysext/backend/Classes/AjaxLoginHandler.php +++ b/typo3/sysext/backend/Classes/Controller/AjaxLoginController.php @@ -1,5 +1,5 @@ <?php -namespace TYPO3\CMS\Backend; +namespace TYPO3\CMS\Backend\Controller; /* * This file is part of the TYPO3 CMS project. @@ -21,7 +21,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; /** * This is the ajax handler for backend login after timeout. */ -class AjaxLoginHandler +class AjaxLoginController { /** * Handles the actual login process, more specifically it defines the response. diff --git a/typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php b/typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php index 976f0b733a8beb4dab3b6b6682d36f00db002cfa..cd6a6b4a5a11df3ee788fdaf56bcd9d41b72968f 100644 --- a/typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php +++ b/typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php @@ -122,27 +122,27 @@ return [ // Log in into backend 'login' => [ 'path' => '/login', - 'target' => \TYPO3\CMS\Backend\AjaxLoginHandler::class . '::loginAction', + 'target' => \TYPO3\CMS\Backend\Controller\AjaxLoginController::class . '::loginAction', 'access' => 'public' ], // Log out from backend 'logout' => [ 'path' => '/logout', - 'target' => \TYPO3\CMS\Backend\AjaxLoginHandler::class . '::logoutAction', + 'target' => \TYPO3\CMS\Backend\Controller\AjaxLoginController::class . '::logoutAction', 'access' => 'public' ], // Refresh login of backend 'login_refresh' => [ 'path' => '/login/refresh', - 'target' => \TYPO3\CMS\Backend\AjaxLoginHandler::class . '::refreshAction', + 'target' => \TYPO3\CMS\Backend\Controller\AjaxLoginController::class . '::refreshAction', ], // Check if backend session has timed out 'login_timedout' => [ 'path' => '/login/timedout', - 'target' => \TYPO3\CMS\Backend\AjaxLoginHandler::class . '::isTimedOutAction', + 'target' => \TYPO3\CMS\Backend\Controller\AjaxLoginController::class . '::isTimedOutAction', 'access' => 'public', 'parameters' => [ 'skipSessionUpdate' => 1 diff --git a/typo3/sysext/backend/Migrations/Code/ClassAliasMap.php b/typo3/sysext/backend/Migrations/Code/ClassAliasMap.php new file mode 100644 index 0000000000000000000000000000000000000000..f759d9c739b08bfdb1ea295ef7ffe4f2fd675150 --- /dev/null +++ b/typo3/sysext/backend/Migrations/Code/ClassAliasMap.php @@ -0,0 +1,4 @@ +<?php +return [ + 'TYPO3\\CMS\\Backend\\AjaxLoginHandler' => \TYPO3\CMS\Backend\Controller\AjaxLoginController::class, +]; diff --git a/typo3/sysext/backend/Migrations/Code/LegacyClassesForIde.php b/typo3/sysext/backend/Migrations/Code/LegacyClassesForIde.php new file mode 100644 index 0000000000000000000000000000000000000000..72f2dfeccd515b3fccb4e09f933a5af1cc9da690 --- /dev/null +++ b/typo3/sysext/backend/Migrations/Code/LegacyClassesForIde.php @@ -0,0 +1,10 @@ +<?php +namespace { + die('Access denied'); +} + +namespace TYPO3\CMS\Backend { + class AjaxLoginHandler extends \TYPO3\CMS\Backend\Controller\AjaxLoginController + { + } +} diff --git a/typo3/sysext/backend/composer.json b/typo3/sysext/backend/composer.json index f516ceebdcf00a23327fa95bc5dbc7a65e419203..bee93bd8527a109de47aa6580ff6981eb4d47770 100644 --- a/typo3/sysext/backend/composer.json +++ b/typo3/sysext/backend/composer.json @@ -30,6 +30,11 @@ "partOfMinimalUsableSystem": true }, "extension-key": "backend" + }, + "typo3/class-alias-loader": { + "class-alias-maps": [ + "Migrations/Code/ClassAliasMap.php" + ] } }, "autoload": { diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-82805-RenamedAjaxLoginHandlerPHPClass.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-82805-RenamedAjaxLoginHandlerPHPClass.rst new file mode 100644 index 0000000000000000000000000000000000000000..568ee755d5720e45a81a678b690aedf88b5249f4 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-82805-RenamedAjaxLoginHandlerPHPClass.rst @@ -0,0 +1,34 @@ +.. include:: ../../Includes.txt + +======================================================== +Deprecation: #82805 - Renamed AjaxLoginHandler PHP class +======================================================== + +See :issue:`82805` + +Description +=========== + +The PHP class :php:`TYPO3\CMS\Backend\AjaxLoginHandler` is renamed to the proper class name +:php:`TYPO3\CMS\Backend\Controller\AjaxLoginController` as its a controller class with actions. + + +Impact +====== + +Using the old PHP class is possible but any usages should be moved to the new class name. + + +Affected Installations +====================== + +Any TYPO3 instances using the PHP class directly in an extension. + + +Migration +========= + +A extension scanner already checks for the old class name. A simple renaming of the class name +to the new class :php:`TYPO3\CMS\Backend\Controller\AjaxLoginController` is sufficient. + +.. index:: PHP-API, FullyScanned \ 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 414ee5298b94e9aecd820995f2bace7373b7409d..5b144b73983afc6b48cfe18ce471ba258aad6a7c 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php @@ -437,6 +437,11 @@ return [ 'Breaking-57594-OptimizeReflectionServiceCacheHandling.rst', ], ], + 'TYPO3\CMS\Backend\AjaxLoginHandler' => [ + 'restFiles' => [ + 'Deprecation-82805-RenamedAjaxLoginHandlerPHPClass.rst', + ], + ], // Removed interfaces 'TYPO3\CMS\Backend\Form\DatabaseFileIconsHookInterface' => [