[FOLLOWUP] Convert remaining occurences of makeInstance 89/34089/3
authorXavier Perseguers <xavier@typo3.org>
Thu, 13 Nov 2014 15:47:33 +0000 (16:47 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 13 Nov 2014 23:31:53 +0000 (00:31 +0100)
Releases: master
Resolves: #61788
Change-Id: I1397bdc6e10e28c7867be433f27349ba3368a875
Reviewed-on: http://review.typo3.org/34089
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
46 files changed:
typo3/show_item.php
typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php
typo3/sysext/backend/Classes/Form/Element/GroupElement.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/InterfaceState/ExtDirect/DataProvider.php
typo3/sysext/backend/Classes/View/BackendLayout/BackendLayout.php
typo3/sysext/backend/Classes/View/BackendLayout/DataProviderCollection.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/core/Classes/Collection/StaticRecordCollection.php
typo3/sysext/core/Classes/Error/ErrorHandler.php
typo3/sysext/core/Classes/Error/ProductionExceptionHandler.php
typo3/sysext/core/Classes/FormProtection/BackendFormProtection.php
typo3/sysext/core/Classes/Messaging/FlashMessageService.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/MailUtility.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-61828-RemoveIsDisplayCondition.rst
typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php
typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php
typo3/sysext/core/Tests/Functional/DataHandling/Framework/DataSet.php
typo3/sysext/core/Tests/Functional/Framework/Frontend/Collector.php
typo3/sysext/core/Tests/Functional/Framework/Frontend/Hook/BackendUserHandler.php
typo3/sysext/core/Tests/Functional/Framework/Frontend/Renderer.php
typo3/sysext/documentation/Classes/Controller/DocumentController.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/frontend/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/frontend/Classes/FrontendRequestHandler.php
typo3/sysext/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/impexp/Classes/Task/ImportExportTask.php
typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php
typo3/sysext/install/Classes/Updates/AbstractUpdate.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/openid/Classes/Wizard.php
typo3/sysext/openid/wizard/index.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/reports/Classes/Report/Status/FalStatus.php
typo3/sysext/reports/Classes/Report/Status/Typo3Status.php
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/version/Classes/DataHandler/CommandMap.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/Hook/PreviewHook.php
typo3/sysext/workspaces/Classes/Service/Dependency/CollectionService.php

index 644b87a..48453a3 100644 (file)
@@ -15,7 +15,7 @@
 require __DIR__ . '/init.php';
 
 $elementInformationController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-       'TYPO3\\CMS\\Backend\\Controller\\ContentElement\\ElementInformationController'
+       \TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController::class
 );
 $elementInformationController->main();
 $elementInformationController->printContent();
index 2d3c6ab..df379a1 100644 (file)
@@ -69,7 +69,7 @@ class ModulesController extends ActionController {
                                $securityWarnings = '<p>' . implode('', $warnings) . '</p>';
                        }
                        $securityMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                $securityWarnings,
                                $this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:warning.header'),
                                FlashMessage::ERROR
index 5c44931..6bd8585 100644 (file)
@@ -150,7 +150,7 @@ class GroupElement extends AbstractFormElement {
                                                                /** @var $flashMessage FlashMessage */
                                                                $message = $exception->getMessage();
                                                                $flashMessage = GeneralUtility::makeInstance(
-                                                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                                                       FlashMessage::class,
                                                                        htmlspecialchars($message), '', FlashMessage::ERROR, TRUE
                                                                );
                                                                /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
index 6c61e55..fe755b2 100644 (file)
@@ -3174,15 +3174,14 @@ class FormEngine {
                        );
                        /** @var $flashMessage FlashMessage */
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                htmlspecialchars($message),
                                '',
                                FlashMessage::ERROR,
                                TRUE
                        );
-                       $class = 'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService';
                        /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-                       $flashMessageService = GeneralUtility::makeInstance($class);
+                       $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
                        $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
                        $defaultFlashMessageQueue->enqueue($flashMessage);
                }
index 58eaf04..ea38202 100644 (file)
@@ -31,7 +31,7 @@ class DataProvider {
        public function __construct() {
                // All data is saved in BE_USER->uc
                $this->userSettings = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\User\\ExtDirect\\BackendUserSettingsDataProvider'
+                       \TYPO3\CMS\Backend\User\ExtDirect\BackendUserSettingsDataProvider::class
                );
        }
 
index 04bd055..03e44a7 100644 (file)
@@ -59,7 +59,7 @@ class BackendLayout {
         */
        static public function create($identifier, $title, $configuration) {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayout',
+                       BackendLayout::class,
                        $identifier,
                        $title,
                        $configuration
index f4ee209..63bab53 100644 (file)
@@ -120,7 +120,7 @@ class DataProviderCollection implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function createBackendLayoutCollection($identifier) {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayout\\BackendLayoutCollection', $identifier
+                       BackendLayoutCollection::class, $identifier
                );
        }
 
index ab75bd9..41ef5b7 100644 (file)
@@ -55,7 +55,7 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface {
        protected function initializeDataProviderCollection() {
                /** @var $dataProviderCollection BackendLayout\DataProviderCollection */
                $dataProviderCollection = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayout\\DataProviderCollection'
+                       BackendLayout\DataProviderCollection::class
                );
 
                $dataProviderCollection->add(
@@ -403,9 +403,7 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface {
         * @return BackendLayout\DataProviderContext
         */
        protected function createDataProviderContext() {
-               return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayout\\DataProviderContext'
-               );
+               return GeneralUtility::makeInstance(BackendLayout\DataProviderContext::class);
        }
 
        /**
index 357fbdc..0d6ea0a 100644 (file)
@@ -1556,7 +1556,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                } else {
                                                        $message = sprintf($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue'), $row['list_type']);
                                                        $out .= GeneralUtility::makeInstance(
-                                                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                                               FlashMessage::class,
                                                                htmlspecialchars($message),
                                                                '',
                                                                FlashMessage::WARNING
@@ -1596,7 +1596,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                        $row['CType']
                                                );
                                                $out .= GeneralUtility::makeInstance(
-                                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                                       FlashMessage::class,
                                                        htmlspecialchars($message),
                                                        '',
                                                        FlashMessage::WARNING
@@ -2175,9 +2175,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         * @return BackendLayoutView
         */
        protected function getBackendLayoutView() {
-               return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\View\\BackendLayoutView'
-               );
+               return GeneralUtility::makeInstance(BackendLayoutView::class);
        }
 
        /**
index 9a95294..00d5e17 100644 (file)
@@ -64,7 +64,7 @@ class CategoryCollection extends \TYPO3\CMS\Core\Collection\AbstractRecordCollec
        static public function create(array $collectionRecord, $fillItems = FALSE) {
                /** @var $collection \TYPO3\CMS\Core\Category\Collection\CategoryCollection */
                $collection = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Category\\Collection\\CategoryCollection',
+                       CategoryCollection::class,
                        $collectionRecord['table_name'],
                        $collectionRecord['field_name']
                );
index 5c61e0b..98eea2a 100644 (file)
@@ -32,7 +32,7 @@ class StaticRecordCollection extends AbstractRecordCollection implements Editabl
        static public function create(array $collectionRecord, $fillItems = FALSE) {
                /** @var $collection StaticRecordCollection */
                $collection = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Collection\\StaticRecordCollection',
+                       StaticRecordCollection::class,
                        $collectionRecord['table_name']
                );
                $collection->fromArray($collectionRecord);
index 1fc499d..1c8c031 100644 (file)
@@ -145,7 +145,7 @@ class ErrorHandler implements ErrorHandlerInterface {
                                if (defined('TYPO3_ERRORHANDLER_MODE') && TYPO3_ERRORHANDLER_MODE == 'debug') {
                                        /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
                                        $flashMessage = GeneralUtility::makeInstance(
-                                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                               \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                                                $message,
                                                'PHP ' . $errorLevels[$errorLevel],
                                                $severity
index 9bf2d2a..c7e98b1 100644 (file)
@@ -56,7 +56,7 @@ class ProductionExceptionHandler extends AbstractExceptionHandler {
                $this->sendStatusHeaders($exception);
                $this->writeLogEntries($exception, self::CONTEXT_WEB);
                $messageObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\ErrorpageMessage',
+                       \TYPO3\CMS\Core\Messaging\ErrorpageMessage::class,
                        $this->getMessage($exception),
                        $this->getTitle($exception)
                );
index 512be27..779328b 100644 (file)
@@ -66,6 +66,8 @@ namespace TYPO3\CMS\Core\FormProtection;
  * }
  * </pre>
  */
+use TYPO3\CMS\Core\Messaging\FlashMessageService;
+
 /**
  * Backend form protection
  *
@@ -109,17 +111,17 @@ class BackendFormProtection extends AbstractFormProtection {
         * @return void
         */
        protected function createValidationErrorMessage() {
+               /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
                $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                       \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                        $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:error.formProtection.tokenInvalid'),
                        '',
                        \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
                        !$this->isAjaxRequest()
                );
-               /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-               $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'
-               );
+               /** @var $flashMessageService FlashMessageService */
+               $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(FlashMessageService::class);
+
                /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
                $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
                $defaultFlashMessageQueue->enqueue($flashMessage);
index 9328995..3bc176d 100644 (file)
@@ -39,7 +39,7 @@ class FlashMessageService implements \TYPO3\CMS\Core\SingletonInterface {
        public function getMessageQueueByIdentifier($identifier = 'core.template.flashMessages') {
                if (!isset($this->flashMessageQueues[$identifier])) {
                        $this->flashMessageQueues[$identifier] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                               'TYPO3\CMS\Core\Messaging\FlashMessageQueue',
+                               \TYPO3\CMS\Core\Messaging\FlashMessageQueue::class,
                                $identifier
                        );
                }
index 1995482..4487a6b 100644 (file)
@@ -1985,7 +1985,7 @@ class ResourceStorage implements ResourceStorageInterface {
                                $parentPermissions = $this->driver->getPermissions($this->driver->getParentFolderIdentifierOfIdentifier($identifier));
                                if ($parentPermissions['r']) {
                                        $folder = GeneralUtility::makeInstance(
-                                               'TYPO3\\CMS\\Core\\Resource\\InaccessibleFolder', $this, $data['identifier'], $data['name']
+                                               \TYPO3\CMS\Core\Resource\InaccessibleFolder::class, $this, $data['identifier'], $data['name']
                                        );
                                }
                        }
index 3583d2d..2d8f717 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Core\Utility\File;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
@@ -273,7 +274,7 @@ class ExtendedFileUtility extends BasicFileUtility {
        public function pushErrorMessagesToFlashMessageQueue() {
                foreach ($this->getErrorMessages() as $msg) {
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                $msg,
                                '',
                                FlashMessage::ERROR,
@@ -950,10 +951,9 @@ class ExtendedFileUtility extends BasicFileUtility {
         * @return void
         */
        protected function addFlashMessage(FlashMessage $flashMessage) {
-               /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-               $flashMessageService = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'
-               );
+               /** @var $flashMessageService FlashMessageService */
+               $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
+
                /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
                $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
                $defaultFlashMessageQueue->enqueue($flashMessage);
index 59c9da5..f4dd276 100644 (file)
@@ -158,7 +158,7 @@ class MailUtility {
        static public function parseAddresses($rawAddresses) {
                /** @var $addressParser \TYPO3\CMS\Core\Mail\Rfc822AddressesParser */
                $addressParser = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Mail\\Rfc822AddressesParser',
+                       \TYPO3\CMS\Core\Mail\Rfc822AddressesParser::class,
                        $rawAddresses
                );
                $addresses = $addressParser->parseAddressList();
index 0169e16..bfa968e 100644 (file)
@@ -27,5 +27,5 @@ Migration
 Use \TYPO3\CMS\Backend\Form\ElementConditionMatcher instead of \TYPO3\CMS\Backend\Form\FormEngine::isDisplayCondition
 
 /** @var $elementConditionMatcher \TYPO3\CMS\Backend\Form\ElementConditionMatcher */
-$elementConditionMatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\ElementConditionMatcher');
+$elementConditionMatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Form\ElementConditionMatcher::class);
 $elementConditionMatcher->match($displayCond, $row, $ffValueKey);
index 7cd87db..67de51e 100644 (file)
@@ -96,7 +96,7 @@ abstract class AbstractDataHandlerActionTestCase extends \TYPO3\CMS\Core\Tests\F
         */
        protected function getActionService() {
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Tests\\Functional\\DataHandling\\Framework\\ActionService'
+                       \TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework\ActionService::class
                );
        }
 
index 63aec53..4fd5843 100644 (file)
@@ -426,14 +426,10 @@ class ActionService {
        }
 
        /**
-        * @return \TYPO3\CMS\Core\DataHandling\DataHandler
+        * @return DataHandler
         */
        protected function createDataHandler() {
-               $dataHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\DataHandling\\DataHandler'
-               );
-               $this->dataHandler = $dataHandler;
-               return $dataHandler;
+               return $this->dataHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(DataHandler::class);
        }
 
        /**
@@ -441,7 +437,7 @@ class ActionService {
         */
        protected function getWorkspaceService() {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService'
+                       \TYPO3\CMS\Workspaces\Service\WorkspaceService::class
                );
        }
 
index e4f31c9..d7c8556 100644 (file)
@@ -34,7 +34,7 @@ class DataSet {
                $data = self::parseData(self::readData($fileName));
 
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Tests\\Functional\\DataHandling\\Framework\\DataSet',
+                       \TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework\DataSet::class,
                        $data
                );
        }
index 9d4930e..f126223 100644 (file)
@@ -166,7 +166,7 @@ class Collector implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function getRenderer() {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Tests\\Functional\\Framework\\Frontend\\Renderer'
+                       \TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\Renderer::class
                );
        }
 
index b8ebd63..48fcd99 100644 (file)
@@ -47,7 +47,7 @@ class BackendUserHandler implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function createBackendUser() {
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Backend\\FrontendBackendUserAuthentication'
+                       \TYPO3\CMS\Backend\FrontendBackendUserAuthentication::class
                );
        }
 
index 1f257f5..630a880 100644 (file)
@@ -82,7 +82,7 @@ class Renderer implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function createParser() {
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Tests\\Functional\\Framework\\Frontend\\Parser'
+                       \TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\Parser::class
                );
        }
 
index 380fd42..6a3e96f 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Documentation\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -150,56 +151,56 @@ class DocumentController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
                        $result = $this->documentationService->fetchNearestDocument($url, $key, $version ?: 'latest', $language);
 
                        if ($result) {
-                               $this->controllerContext->getFlashMessageQueue()->enqueue(
-                                       GeneralUtility::makeInstance(
-                                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
-                                               \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
-                                                       'downloadSucceeded',
-                                                       'documentation'
-                                               ),
-                                               '',
-                                               \TYPO3\CMS\Core\Messaging\AbstractMessage::OK,
-                                               TRUE
-                                       )
+                               /** @var FlashMessage $message */
+                               $message = GeneralUtility::makeInstance(
+                                       FlashMessage::class,
+                                       \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
+                                               'downloadSucceeded',
+                                               'documentation'
+                                       ),
+                                       '',
+                                       \TYPO3\CMS\Core\Messaging\AbstractMessage::OK,
+                                       TRUE
                                );
                        } else {
-                               $this->controllerContext->getFlashMessageQueue()->enqueue(
-                                       GeneralUtility::makeInstance(
-                                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
-                                               \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
-                                                       'downloadFailedNoArchive',
-                                                       'documentation'
-                                               ),
-                                               \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
-                                                       'downloadFailed',
-                                                       'documentation'
-                                               ),
-                                               \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR,
-                                               TRUE
-                                       )
-                               );
-                       }
-               } catch (\Exception $e) {
-                       $this->controllerContext->getFlashMessageQueue()->enqueue(
-                               GeneralUtility::makeInstance(
-                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               /** @var FlashMessage $message */
+                               $message = GeneralUtility::makeInstance(
+                                       FlashMessage::class,
                                        \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
-                                               'downloadFailedDetails',
-                                               'documentation',
-                                               array(
-                                                       $key,
-                                                       $e->getMessage(),
-                                                       $e->getCode()
-                                               )
+                                               'downloadFailedNoArchive',
+                                               'documentation'
                                        ),
                                        \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
                                                'downloadFailed',
                                                'documentation'
                                        ),
-                                       \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR,
+                                       FlashMessage::ERROR,
                                        TRUE
-                               )
+                               );
+
+                       }
+                       $this->controllerContext->getFlashMessageQueue()->enqueue($message);
+               } catch (\Exception $e) {
+                       /** @var FlashMessage $message */
+                       $message = GeneralUtility::makeInstance(
+                               FlashMessage::class,
+                               \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
+                                       'downloadFailedDetails',
+                                       'documentation',
+                                       array(
+                                               $key,
+                                               $e->getMessage(),
+                                               $e->getCode()
+                                       )
+                               ),
+                               \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
+                                       'downloadFailed',
+                                       'documentation'
+                               ),
+                               FlashMessage::ERROR,
+                               TRUE
                        );
+                       $this->controllerContext->getFlashMessageQueue()->enqueue($message);
                }
                $this->redirect('download');
        }
index 23411bd..c1eee0b 100644 (file)
@@ -165,7 +165,7 @@ abstract class AbstractController implements ControllerInterface {
                }
                /* @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
                $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $messageBody, $messageTitle, $severity, $storeInSession
+                       \TYPO3\CMS\Core\Messaging\FlashMessage::class, $messageBody, $messageTitle, $severity, $storeInSession
                );
                $this->controllerContext->getFlashMessageQueue()->enqueue($flashMessage);
        }
index 8b1b680..0d5d2d1 100644 (file)
@@ -35,7 +35,7 @@ class CategoryCollection extends \TYPO3\CMS\Core\Category\Collection\CategoryCol
        static public function create(array $collectionRecord, $fillItems = FALSE) {
                /** @var $collection \TYPO3\CMS\Frontend\Category\Collection\CategoryCollection */
                $collection = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Frontend\\Category\\Collection\\CategoryCollection',
+                       \TYPO3\CMS\Frontend\Category\Collection\CategoryCollection::class,
                        $collectionRecord['table_name'],
                        $collectionRecord['field_name']
                );
index 287cc62..8567f3b 100644 (file)
@@ -68,7 +68,7 @@ class FrontendRequestHandler {
 
                /** @var $GLOBALS['TSFE'] \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController */
                $GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController',
+                       \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class,
                        $GLOBALS['TYPO3_CONF_VARS'],
                        \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'),
                        \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('type'),
index 65ce1c8..ac4e23f 100644 (file)
@@ -89,7 +89,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                } else {
                        // If no access or if ID == zero
                        $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                                $GLOBALS['LANG']->getLL('clickAPage_content'),
                                $GLOBALS['LANG']->getLL('title'),
                                \TYPO3\CMS\Core\Messaging\FlashMessage::INFO
index 322f86b..50b7736 100644 (file)
@@ -138,7 +138,7 @@ class ImportExportTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                        } else {
                                // No presets found
                                $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                       \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                                        $GLOBALS['LANG']->getLL('no-presets'),
                                        '',
                                        \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE
index 6158d62..1f327ce 100644 (file)
@@ -90,7 +90,7 @@ class EnvironmentStatusReport implements StatusProviderInterface, ExtendedStatus
                                }
                                $severity = constant('\TYPO3\CMS\Reports\Status::' . strtoupper($type));
                                $statusArray[] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                                       'TYPO3\\CMS\\Reports\\Status',
+                                       \TYPO3\CMS\Reports\Status::class,
                                        $GLOBALS['LANG']->sL($pathToXliff . ':environment.status.title'),
                                        sprintf($GLOBALS['LANG']->sL($pathToXliff . ':environment.status.value'), $value),
                                        $message,
index 0416ae6..1b3a20a 100644 (file)
@@ -174,7 +174,7 @@ abstract class AbstractUpdate {
        protected function installExtensions(array $extensionKeys) {
                /** @var $installUtility \TYPO3\CMS\Extensionmanager\Utility\InstallUtility */
                $installUtility = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility'
+                       \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class
                );
                foreach ($extensionKeys as $extension) {
                        $installUtility->install($extension);
index ba5f0ce..da92262 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Linkvalidator\Report;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -338,12 +339,12 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                        $this->content = $this->renderBrokenLinksTable();
                } else {
                        // If no access or if ID == zero
-                       /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
+                       /** @var FlashMessage $message */
                        $message = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                $GLOBALS['LANG']->getLL('no.access'),
                                $GLOBALS['LANG']->getLL('no.access.title'),
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                               FlashMessage::ERROR
                        );
                        $this->content .= $message->render();
                }
@@ -453,12 +454,12 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         */
        protected function getNoBrokenLinkMessage(array $brokenLinksMarker) {
                $brokenLinksMarker['LIST_HEADER'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
-               /** @var $message \TYPO3\CMS\Core\Messaging\FlashMessage */
+               /** @var $message FlashMessage */
                $message = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                       FlashMessage::class,
                        $GLOBALS['LANG']->getLL('list.no.broken.links'),
                        $GLOBALS['LANG']->getLL('list.no.broken.links.title'),
-                       \TYPO3\CMS\Core\Messaging\FlashMessage::OK
+                       FlashMessage::OK
                );
                $brokenLinksMarker['NO_BROKEN_LINKS'] = $message->render();
                return $brokenLinksMarker;
index 20fe2a3..3ed0ec4 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Lowlevel\View;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
@@ -241,7 +242,7 @@ class ConfigurationView {
                                if ($success) {
                                        // show flash message
                                        $flashMessage = GeneralUtility::makeInstance(
-                                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                               FlashMessage::class,
                                                '',
                                                sprintf(
                                                        LocalizationUtility::translate('writeMessage', 'lowlevel'),
@@ -249,15 +250,15 @@ class ConfigurationView {
                                                        '<br />',
                                                        '<strong>' . nl2br(htmlspecialchars($changedLine)) . '</strong>'
                                                ),
-                                               \TYPO3\CMS\Core\Messaging\FlashMessage::OK
+                                               FlashMessage::OK
                                        );
                                } else {
                                        // Error: show flash message
                                        $flashMessage = GeneralUtility::makeInstance(
-                                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                               FlashMessage::class,
                                                '',
                                                sprintf(LocalizationUtility::translate('writeMessageFailed', 'lowlevel'), TYPO3_extTableDef_script),
-                                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                                               FlashMessage::ERROR
                                        );
                                }
                                $this->getFlashMessageQueue()->enqueue($flashMessage);
index 161cce6..0162240 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Openid;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -73,16 +74,16 @@ class Wizard extends OpenidService {
 
                        // When sendOpenIDRequest() returns, there was an error
                        $flashMessageService = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'
+                               \TYPO3\CMS\Core\Messaging\FlashMessageService::class
                        );
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:error.setup'),
                                        htmlspecialchars($openIDIdentifier)
                                ),
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:title.error'),
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                               FlashMessage::ERROR
                        );
                        $flashMessageService->getMessageQueueByIdentifier()->enqueue($flashMessage);
                }
@@ -120,48 +121,46 @@ class Wizard extends OpenidService {
         */
        protected function handleResponse() {
                /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-               $flashMessageService = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'
-               );
+               $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
                $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
 
                if (!$this->openIDResponse instanceof \Auth_OpenID_ConsumerResponse) {
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:error.no-response'),
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:title.error'),
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                               FlashMessage::ERROR
                        );
                } elseif ($this->openIDResponse->status == Auth_OpenID_SUCCESS) {
                        // all fine
                        $this->claimedId = $this->getSignedParameter('openid_claimed_id');
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:youropenid'),
                                        htmlspecialchars($this->claimedId)
                                ),
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:title.success'),
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::OK
+                               FlashMessage::OK
                        );
                } elseif ($this->openIDResponse->status == Auth_OpenID_CANCEL) {
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:error.cancelled'),
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:title.error'),
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                               FlashMessage::ERROR
                        );
                } else {
                        // another failure. show error message and form again
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               FlashMessage::class,
                                sprintf(
                                        $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:error.general'),
                                        htmlspecialchars($this->openIDResponse->status),
                                        htmlspecialchars($this->openIDResponse->message)
                                ),
                                $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:title.error'),
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                               FlashMessage::ERROR
                        );
                }
 
@@ -182,10 +181,9 @@ class Wizard extends OpenidService {
                );
 
                /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-               $flashMessageService = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'
-               );
+               $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
                $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
+
                $messages = array();
                foreach ($defaultFlashMessageQueue->getAllMessagesAndFlush() as $message) {
                        $messages[] = $message->render();
index ca18256..883447a 100644 (file)
@@ -14,6 +14,6 @@
 define('TYPO3_MOD_PATH', 'sysext/openid/wizard/');
 
 $wizard = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-       'TYPO3\\CMS\\Openid\\Wizard'
+       \TYPO3\CMS\Openid\Wizard::class
 );
 $wizard->main();
index 2637103..a5c4291 100644 (file)
@@ -2629,7 +2629,7 @@ class ElementBrowser {
                        . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', TRUE) . '</a>';
                /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
                $flashMessage = GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                       \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                        $link,
                        '',
                        \TYPO3\CMS\Core\Messaging\FlashMessage::INFO
index dd89f49..a7f7a7b 100644 (file)
@@ -409,7 +409,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                        $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:missingTcaColumnsMessage', TRUE), $table, $table);
                        $messageTitle = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:missingTcaColumnsMessageTitle', TRUE);
                        $flashMessage = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                                $message,
                                $messageTitle,
                                \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
index 32d8eac..6c8277a 100644 (file)
@@ -111,7 +111,7 @@ class FalStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
                        $severity = \TYPO3\CMS\Reports\Status::WARNING;
                }
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Reports\\Status',
+                       \TYPO3\CMS\Reports\Status::class,
                        $GLOBALS['LANG']->getLL('status_contentAdapterActive'),
                        $value,
                        $message,
index 0ce6662..3c5f0c6 100644 (file)
@@ -68,7 +68,7 @@ class Typo3Status implements \TYPO3\CMS\Reports\StatusProviderInterface {
                }
 
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Reports\\Status',
+                       \TYPO3\CMS\Reports\Status::class,
                        $GLOBALS['LANG']->getLL('status_oldXclassUsage'),
                        $value,
                        $message,
@@ -111,7 +111,7 @@ class Typo3Status implements \TYPO3\CMS\Reports\StatusProviderInterface {
                }
 
                return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Reports\\Status',
+                       \TYPO3\CMS\Reports\Status::class,
                        $GLOBALS['LANG']->getLL('status_xclassUsage'),
                        $value,
                        $message,
index 70cf6ed..adf3b1d 100644 (file)
@@ -108,7 +108,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                                break;
                                        default:
                                                $flashMessage = GeneralUtility::makeInstance(
-                                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                                       \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                                                        $GLOBALS['LANG']->getLL('action_noType', TRUE),
                                                        $GLOBALS['LANG']->getLL('action_error'),
                                                        \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
index 38462a0..dba1934 100644 (file)
@@ -224,7 +224,7 @@ class CommandMap {
        protected function getElementEntityProcessor() {
                if (!isset($this->elementEntityProcessor)) {
                        $this->elementEntityProcessor = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Version\\Dependency\\ElementEntityProcessor'
+                               \TYPO3\CMS\Version\Dependency\ElementEntityProcessor::class
                        );
                        $this->elementEntityProcessor->setWorkspace($this->getWorkspace());
                }
@@ -830,8 +830,10 @@ class CommandMap {
         */
        protected function getDependencyCallback($method, array $targetArguments = array()) {
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Version\\Dependency\\EventCallback',
-                       $this->getElementEntityProcessor(), $method, $targetArguments
+                       \TYPO3\CMS\Version\Dependency\EventCallback::class,
+                       $this->getElementEntityProcessor(),
+                       $method,
+                       $targetArguments
                );
        }
 
index 3c0a857..a2a3e9b 100644 (file)
@@ -1326,7 +1326,7 @@ class DataHandlerHook {
         */
        public function getCommandMap(DataHandler $tceMain) {
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Version\\DataHandler\\CommandMap',
+                       \TYPO3\CMS\Version\DataHandler\CommandMap::class,
                        $this,
                        $tceMain,
                        $tceMain->cmdmap,
index 5e28d11..0823bc5 100644 (file)
@@ -62,7 +62,7 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface {
                        // because the GET variables are taken from the preview
                        // configuration
                        $this->tsfeObj = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController',
+                               \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class,
                                $GLOBALS['TYPO3_CONF_VARS'],
                                GeneralUtility::_GP('id'),
                                GeneralUtility::_GP('type'),
index e644e21..4744db8 100644 (file)
@@ -31,7 +31,7 @@ class CollectionService implements \TYPO3\CMS\Core\SingletonInterface {
        protected $dataHandler;
 
        /**
-        * @var \TYPO3\CMS\Version\Dependency\ElementEntityProcessor
+        * @var Dependency\ElementEntityProcessor
         */
        protected $elementEntityProcessor;
 
@@ -87,7 +87,7 @@ class CollectionService implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function getDependencyCallback($method, array $targetArguments = array()) {
                return GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Version\\Dependency\\EventCallback',
+                       \TYPO3\CMS\Version\Dependency\EventCallback::class,
                        $this->getElementEntityProcessor(), $method, $targetArguments
                );
        }
@@ -95,13 +95,11 @@ class CollectionService implements \TYPO3\CMS\Core\SingletonInterface {
        /**
         * Gets the element entity processor.
         *
-        * @return \TYPO3\CMS\Version\Dependency\ElementEntityProcessor
+        * @return Dependency\ElementEntityProcessor
         */
        protected function getElementEntityProcessor() {
                if (!isset($this->elementEntityProcessor)) {
-                       $this->elementEntityProcessor = GeneralUtility::makeInstance(
-                               'TYPO3\\CMS\\Version\\Dependency\\ElementEntityProcessor'
-                       );
+                       $this->elementEntityProcessor = GeneralUtility::makeInstance(Dependency\ElementEntityProcessor::class);
                        $this->elementEntityProcessor->setWorkspace($this->getWorkspace());
                }
                return $this->elementEntityProcessor;
@@ -214,4 +212,4 @@ class CollectionService implements \TYPO3\CMS\Core\SingletonInterface {
                }
        }
 
-}
\ No newline at end of file
+}