Commit cb7f35fc authored by Xavier Perseguers's avatar Xavier Perseguers
Browse files

[TASK] Use fully qualified name resolution in PHP 5.5

Since PHP 5.5 is a requirement, calls to GeneralUtility::makeInstance()
should use the ::class construct instead of a string argument.

Releases: master
Resolves: #61788
Change-Id: Ia2efc5a4cb7ecea80b8a1c8e5ff7b5d6fa9a07ce
Reviewed-on: http://review.typo3.org/32913

Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Alexander Opitz's avatarAlexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz's avatarAlexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Tested-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
parent 98e27d3a
......@@ -60,7 +60,7 @@ if ($ajaxRegistryEntry !== NULL) {
}
// Instantiating the AJAX object
$ajaxObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler', $ajaxID);
$ajaxObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Http\AjaxRequestHandler::class, $ajaxID);
$ajaxParams = array();
// Evaluating the arguments and calling the AJAX method/function
......
......@@ -27,6 +27,6 @@
*/
require __DIR__ . '/init.php';
$clickMenuController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\ClickMenuController');
$clickMenuController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ClickMenuController::class);
$clickMenuController->main();
$clickMenuController->printContent();
\ No newline at end of file
......@@ -21,7 +21,7 @@ require_once 'init.php';
// Make instance if it is not an AJAX call
if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
$pageTreeNavigationController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\PageTreeNavigationController');
$pageTreeNavigationController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\PageTreeNavigationController::class);
$pageTreeNavigationController->initPage();
$pageTreeNavigationController->main();
$pageTreeNavigationController->printContent();
......
......@@ -23,7 +23,7 @@ require_once 'init.php';
\TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
/* @var $editDocumentController \TYPO3\CMS\Backend\Controller\EditDocumentController */
$editDocumentController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController');
$editDocumentController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\EditDocumentController::class);
// Preprocessing, storing data if submitted to
$editDocumentController->preInit();
......
......@@ -21,6 +21,6 @@
*/
require __DIR__ . '/init.php';
$noDocumentsOpenController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\NoDocumentsOpenController');
$noDocumentsOpenController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\NoDocumentsOpenController::class);
$noDocumentsOpenController->main();
$noDocumentsOpenController->printContent();
......@@ -21,7 +21,7 @@ require_once 'init.php';
// Make instance if it is not an AJAX call
if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
$fileSystemNavigationFrameController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\FileSystemNavigationFrameController');
$fileSystemNavigationFrameController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\FileSystemNavigationFrameController::class);
$fileSystemNavigationFrameController->initPage();
$fileSystemNavigationFrameController->main();
$fileSystemNavigationFrameController->printContent();
......
......@@ -15,7 +15,7 @@ require_once 'init.php';
$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_misc.xlf');
// Document generation
$TYPO3backend = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\BackendController');
$TYPO3backend = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\BackendController::class);
// Include extensions which may add css, javascript or toolbar items
if (is_array($GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'] as $additionalBackendItem) {
......
......@@ -19,6 +19,6 @@
*/
require __DIR__ . '/init.php';
$elementBrowserFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Recordlist\\Controller\\ElementBrowserFramesetController');
$elementBrowserFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class);
$elementBrowserFramesetController->main();
$elementBrowserFramesetController->printContent();
......@@ -52,6 +52,6 @@ class newRecordLocalPageTree extends \TYPO3\CMS\Backend\Tree\View\PageTreeView {
}
}
$newRecordController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\NewRecordController');
$newRecordController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\NewRecordController::class);
$newRecordController->main();
$newRecordController->printContent();
......@@ -19,6 +19,6 @@
*/
require __DIR__ . '/init.php';
$dummyController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\DummyController');
$dummyController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\DummyController::class);
$dummyController->main();
$dummyController->printContent();
......@@ -23,6 +23,6 @@ require __DIR__ . '/init.php';
'Editing a file is moved to an own module. Please use BackendUtility::getModuleUrl(\'file_edit\') to link to file_edit.php. This script will be removed in two versions.'
);
$editFileController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\File\\EditFileController');
$editFileController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\File\EditFileController::class);
$editFileController->main();
$editFileController->printContent();
......@@ -23,6 +23,6 @@ require __DIR__ . '/init.php';
'Creating a new folder is moved to an own module. Please use BackendUtility::getModuleUrl(\'file_newfolder\') to link to this script. This script will be removed in two versions.'
);
$createFolderController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\File\\CreateFolderController');
$createFolderController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\File\CreateFolderController::class);
$createFolderController->main();
$createFolderController->printContent();
......@@ -23,6 +23,6 @@ require __DIR__ . '/init.php';
'Renaming a file/folder is moved to an own module. Please use BackendUtility::getModuleUrl(\'file_rename\') to link to this script. This script will be removed.'
);
$renameFileController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\File\\RenameFileController');
$renameFileController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\File\RenameFileController::class);
$renameFileController->main();
$renameFileController->printContent();
......@@ -23,6 +23,6 @@ require __DIR__ . '/init.php';
'Uploading a file is moved to an own module. Please use BackendUtility::getModuleUrl(\'file_upload\') to link to this script. This script will be removed.'
);
$fileUploadController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\File\\FileUploadController');
$fileUploadController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\File\FileUploadController::class);
$fileUploadController->main();
$fileUploadController->printContent();
\ No newline at end of file
......@@ -45,6 +45,6 @@ if (!empty($_SERVER['HTTP_REFERER'])) {
unset($typo3RequestDir);
}
$loginController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\LoginController');
$loginController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginController::class);
$loginController->main();
$loginController->printContent();
......@@ -19,5 +19,5 @@
*/
require __DIR__ . '/init.php';
$listFrameLoaderController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\ListFrameLoaderController');
$listFrameLoaderController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ListFrameLoaderController::class);
$listFrameLoaderController->main();
......@@ -23,6 +23,6 @@ define('TYPO3_PROCEED_IF_NO_USER', 1);
require __DIR__ . '/init.php';
// Make instance:
$loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\LoginFramesetController');
$loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginFramesetController::class);
$loginFramesetController->main();
$loginFramesetController->printContent();
......@@ -20,5 +20,5 @@
*/
require __DIR__ . '/init.php';
$logoutController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\LogoutController');
$logoutController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LogoutController::class);
$logoutController->logout();
......@@ -34,7 +34,7 @@ if ($temp_path = $TBE_MODULES['_PATHS'][$moduleName]) {
} else {
if (is_array($TBE_MODULES['_dispatcher'])) {
foreach ($TBE_MODULES['_dispatcher'] as $dispatcherClassName) {
$dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get($dispatcherClassName);
$dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class)->get($dispatcherClassName);
if ($dispatcher->callModule($moduleName) === TRUE) {
$isDispatched = TRUE;
break;
......
......@@ -142,6 +142,6 @@ class ext_posMap_tt_content extends \TYPO3\CMS\Backend\Tree\View\PagePositionMap
}
}
$moveElementController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\ContentElement\\MoveElementController');
$moveElementController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController::class);
$moveElementController->main();
$moveElementController->printContent();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment