[TASK] Include all classes via use statement in core extensions 12/64212/3
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Fri, 17 Apr 2020 13:31:22 +0000 (15:31 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 17 Apr 2020 18:51:55 +0000 (20:51 +0200)
This patch has been created with rector and php-cs-fixer

Releases: master
Resolves: #91092
Change-Id: I80956bc210237169034acd86ef26c1e8f9725ddb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64212
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
259 files changed:
typo3/sysext/belog/Classes/Controller/BackendLogController.php
typo3/sysext/belog/Classes/Domain/Model/Constraint.php
typo3/sysext/belog/Classes/Domain/Model/LogEntry.php
typo3/sysext/belog/Classes/Domain/Model/Workspace.php
typo3/sysext/belog/Classes/Domain/Repository/LogEntryRepository.php
typo3/sysext/belog/Classes/Domain/Repository/WorkspaceRepository.php
typo3/sysext/belog/Classes/Module/BackendLogModuleBootstrap.php
typo3/sysext/belog/Classes/ViewHelpers/Form/TranslateLabelSelectViewHelper.php
typo3/sysext/belog/Tests/Unit/Domain/Model/ConstraintTest.php
typo3/sysext/belog/Tests/Unit/Domain/Model/LogEntryTest.php
typo3/sysext/belog/Tests/Unit/Domain/Repository/LogEntryRepositoryTest.php
typo3/sysext/belog/Tests/Unit/Domain/Repository/WorkspaceRepositoryTest.php
typo3/sysext/beuser/Classes/Controller/BackendUserController.php
typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php
typo3/sysext/beuser/Classes/Domain/Model/BackendUserGroup.php
typo3/sysext/beuser/Classes/Domain/Model/Demand.php
typo3/sysext/beuser/Classes/Domain/Model/ModuleData.php
typo3/sysext/beuser/Classes/Domain/Repository/BackendUserGroupRepository.php
typo3/sysext/beuser/Classes/Hook/BackendControllerHook.php
typo3/sysext/beuser/Classes/Hook/SwitchBackUserHook.php
typo3/sysext/beuser/Classes/Service/ModuleDataStorageService.php
typo3/sysext/beuser/Tests/Unit/Domain/Model/BackendUserTest.php
typo3/sysext/beuser/Tests/Unit/Domain/Model/DemandTest.php
typo3/sysext/beuser/Tests/Unit/Domain/Repository/BackendUserRepositoryTest.php
typo3/sysext/beuser/Tests/Unit/Domain/Repository/BackendUserSessionRepositoryTest.php
typo3/sysext/beuser/Tests/Unit/Service/ModuleDataStorageServiceTest.php
typo3/sysext/extbase/Tests/Functional/Mvc/Controller/ActionControllerArgumentTest.php
typo3/sysext/extensionmanager/Classes/Controller/AbstractController.php
typo3/sysext/extensionmanager/Classes/Controller/ActionController.php
typo3/sysext/extensionmanager/Classes/Controller/DownloadController.php
typo3/sysext/extensionmanager/Classes/Controller/UpdateFromTerController.php
typo3/sysext/extensionmanager/Classes/Controller/UploadExtensionFileController.php
typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php
typo3/sysext/extensionmanager/Classes/Report/ExtensionStatus.php
typo3/sysext/extensionmanager/Classes/Utility/Connection/TerUtility.php
typo3/sysext/extensionmanager/Classes/Utility/DependencyUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPullParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPushParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/MirrorXmlPullParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/MirrorXmlPushParser.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/XmlParserFactory.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/Be/TriggerViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/DownloadExtensionViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/RemoveExtensionViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/ToggleExtensionInstallationStateViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/UpdateScriptViewHelper.php
typo3/sysext/extensionmanager/Tests/Unit/Controller/DownloadControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Controller/UploadExtensionFileControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Model/ExtensionTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/RepositoryRepositoryTest.php
typo3/sysext/extensionmanager/Tests/Unit/Task/UpdateExtensionListTaskTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/ExtensionModelUtilityTest.php
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php
typo3/sysext/filelist/Classes/ContextMenu/ItemProviders/FileDragProvider.php
typo3/sysext/filelist/Classes/ContextMenu/ItemProviders/FileProvider.php
typo3/sysext/filelist/Classes/Controller/File/FileUploadController.php
typo3/sysext/filelist/Classes/Controller/File/RenameFileController.php
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/filelist/Classes/FileListFolderTree.php
typo3/sysext/filelist/Classes/Hook/BackendControllerHook.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/CopyCutFileViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/EditFileContentViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/RenameFileViewHelper.php
typo3/sysext/filelist/Classes/ViewHelpers/Uri/ReplaceFileViewHelper.php
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php
typo3/sysext/fluid/Classes/Core/Widget/Bootstrap.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/MissingControllerException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/RenderingContextNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/WidgetContextNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/WidgetRequestNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetContext.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestBuilder.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestHandler.php
typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
typo3/sysext/fluid/Classes/View/StandaloneView.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Widget/Controller/PaginateController.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Widget/PaginateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/Select/OptgroupViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/Select/OptionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderChildrenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/AutocompleteViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php
typo3/sysext/fluid/Tests/Functional/View/TemplatesPathsTest.php
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetControllerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AjaxWidgetContextHolderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestHandlerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CObjectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/ExtendsAbstractEntity.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/PasswordViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ImageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/TranslateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php
typo3/sysext/fluid_styled_content/Tests/Functional/Tca/ContentVisibleFieldsTest.php
typo3/sysext/form/Classes/Controller/AbstractBackendController.php
typo3/sysext/form/Classes/Controller/FormFrontendController.php
typo3/sysext/form/Classes/Controller/FormManagerController.php
typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php
typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php
typo3/sysext/form/Classes/Domain/Model/FormDefinition.php
typo3/sysext/form/Classes/Domain/Model/FormElements/FileUpload.php
typo3/sysext/form/Classes/Domain/Renderer/AbstractElementRenderer.php
typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php
typo3/sysext/form/Classes/Hooks/FormPagePreviewRenderer.php
typo3/sysext/form/Classes/Mvc/Configuration/ConfigurationManager.php
typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php
typo3/sysext/form/Classes/Mvc/ProcessingRule.php
typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php
typo3/sysext/form/Classes/ViewHelpers/Form/DatePickerViewHelper.php
typo3/sysext/form/Classes/ViewHelpers/Form/TimePickerViewHelper.php
typo3/sysext/form/Classes/ViewHelpers/Form/UploadedResourceViewHelper.php
typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php
typo3/sysext/impexp/Classes/Command/ImportCommand.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/indexed_search/Classes/Controller/AdministrationController.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/indexed_search/Classes/Utility/IndexedSearchUtility.php
typo3/sysext/indexed_search/Tests/Unit/IndexerTest.php
typo3/sysext/install/Classes/Configuration/Cache/CacheFeature.php
typo3/sysext/install/Classes/Configuration/Cache/CustomCachePreset.php
typo3/sysext/install/Classes/Configuration/Context/ContextFeature.php
typo3/sysext/install/Classes/Configuration/Context/CustomPreset.php
typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php
typo3/sysext/install/Classes/Configuration/Context/LivePreset.php
typo3/sysext/install/Classes/Configuration/Image/AbstractImagePreset.php
typo3/sysext/install/Classes/Configuration/Image/CustomPreset.php
typo3/sysext/install/Classes/Configuration/Image/GraphicsMagickPreset.php
typo3/sysext/install/Classes/Configuration/Image/ImageFeature.php
typo3/sysext/install/Classes/Configuration/Image/ImageMagick6Preset.php
typo3/sysext/install/Classes/Configuration/Mail/CustomPreset.php
typo3/sysext/install/Classes/Configuration/Mail/MailFeature.php
typo3/sysext/install/Classes/Configuration/Mail/SendmailPreset.php
typo3/sysext/install/Classes/Configuration/Mail/SmtpPreset.php
typo3/sysext/install/Classes/Controller/EnvironmentController.php
typo3/sysext/install/Classes/Controller/MaintenanceController.php
typo3/sysext/install/Classes/FolderStructure/AbstractNode.php
typo3/sysext/install/Classes/FolderStructure/DirectoryNode.php
typo3/sysext/install/Classes/FolderStructure/Exception/InvalidArgumentException.php
typo3/sysext/install/Classes/FolderStructure/Exception/RootNodeException.php
typo3/sysext/install/Classes/FolderStructure/FileNode.php
typo3/sysext/install/Classes/FolderStructure/LinkNode.php
typo3/sysext/install/Classes/FolderStructure/RootNode.php
typo3/sysext/install/Classes/Report/InstallStatusReport.php
typo3/sysext/install/Classes/Report/SecurityStatusReport.php
typo3/sysext/install/Classes/Service/ClearCacheService.php
typo3/sysext/install/Classes/Service/CoreVersionService.php
typo3/sysext/install/Classes/Service/LanguagePackService.php
typo3/sysext/install/Classes/Service/LoadTcaService.php
typo3/sysext/install/Classes/Service/SessionService.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/ConstructorArgumentMatcherTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructure/RootNodeTest.php
typo3/sysext/install/Tests/Unit/FolderStructureTestCase.php
typo3/sysext/install/Tests/Unit/Service/CoreUpdateServiceTest.php
typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php
typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php
typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php
typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
typo3/sysext/recordlist/Classes/LinkHandler/AbstractLinkHandler.php
typo3/sysext/recycler/Classes/Task/CleanerTask.php
typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php
typo3/sysext/recycler/Tests/Functional/Recycle/Pages/AdminRecycleTest.php
typo3/sysext/recycler/Tests/Functional/Recycle/Pages/UserRecycleTest.php
typo3/sysext/recycler/Tests/Unit/Task/CleanerTaskTest.php
typo3/sysext/redirects/Classes/EventListener/RecordHistoryRollbackEventsListener.php
typo3/sysext/redirects/Classes/Service/SlugService.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/reports/Tests/Unit/Report/Status/Typo3StatusTest.php
typo3/sysext/scheduler/Classes/AdditionalFieldProviderInterface.php
typo3/sysext/scheduler/Classes/CronCommand/CronCommand.php
typo3/sysext/scheduler/Classes/Example/SleepTask.php
typo3/sysext/scheduler/Classes/Example/TestTask.php
typo3/sysext/scheduler/Classes/Execution.php
typo3/sysext/scheduler/Classes/Scheduler.php
typo3/sysext/scheduler/Classes/Task/AbstractTask.php
typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionTask.php
typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandTask.php
typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/FileStorageExtractionTask.php
typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/FileStorageIndexingTask.php
typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionTask.php
typo3/sysext/scheduler/Tests/Functional/Tca/TaskGroupVisibleFieldsTest.php
typo3/sysext/scheduler/Tests/Unit/Task/CachingFrameworkGarbageCollectionTest.php
typo3/sysext/seo/Classes/XmlSitemap/Exception/InvalidConfigurationException.php
typo3/sysext/seo/Classes/XmlSitemap/Exception/MissingConfigurationException.php
typo3/sysext/sys_note/Classes/Hook/PageHook.php
typo3/sysext/tstemplate/Classes/Controller/TemplateAnalyzerModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php
typo3/sysext/workspaces/Classes/ColumnDataProviderInterface.php
typo3/sysext/workspaces/Classes/Service/Dependency/CollectionService.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Modify/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Publish/ActionTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/PublishAll/ActionTest.php

index 8326969..b2774b1 100644 (file)
 
 namespace TYPO3\CMS\Belog\Controller;
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Belog\Domain\Model\Constraint;
 use TYPO3\CMS\Belog\Domain\Model\LogEntry;
+use TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository;
+use TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository;
 use TYPO3\CMS\Core\Messaging\AbstractMessage;
 use TYPO3\CMS\Core\Page\PageRenderer;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
 use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
@@ -73,7 +77,7 @@ class BackendLogController extends ActionController
     /**
      * @param \TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository $logEntryRepository
      */
-    public function injectLogEntryRepository(\TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository $logEntryRepository)
+    public function injectLogEntryRepository(LogEntryRepository $logEntryRepository)
     {
         $this->logEntryRepository = $logEntryRepository;
     }
@@ -242,17 +246,17 @@ class BackendLogController extends ActionController
     {
         $userGroupArray = [];
         // Two meta entries: 'all' and 'self'
-        $userGroupArray[0] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('allUsers', 'Belog');
-        $userGroupArray[-1] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('self', 'Belog');
+        $userGroupArray[0] = LocalizationUtility::translate('allUsers', 'Belog');
+        $userGroupArray[-1] = LocalizationUtility::translate('self', 'Belog');
         // List of groups, key is gr-'uid'
-        $groups = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames();
+        $groups = BackendUtility::getGroupNames();
         foreach ($groups as $group) {
-            $userGroupArray['gr-' . $group['uid']] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('group', 'Belog') . ' ' . $group['title'];
+            $userGroupArray['gr-' . $group['uid']] = LocalizationUtility::translate('group', 'Belog') . ' ' . $group['title'];
         }
         // List of users, key is us-'uid'
-        $users = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
+        $users = BackendUtility::getUserNames();
         foreach ($users as $user) {
-            $userGroupArray['us-' . $user['uid']] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('user', 'Belog') . ' ' . $user['username'];
+            $userGroupArray['us-' . $user['uid']] = LocalizationUtility::translate('user', 'Belog') . ' ' . $user['username'];
         }
         return $userGroupArray;
     }
@@ -264,14 +268,14 @@ class BackendLogController extends ActionController
      */
     protected function createWorkspaceListForSelectOptions()
     {
-        if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
+        if (!ExtensionManagementUtility::isLoaded('workspaces')) {
             return [];
         }
         $workspaceArray = [];
         // Two meta entries: 'all' and 'live'
-        $workspaceArray[-99] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('any', 'Belog');
-        $workspaceArray[0] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('live', 'Belog');
-        $workspaces = $this->objectManager->get(\TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository::class)->findAll();
+        $workspaceArray[-99] = LocalizationUtility::translate('any', 'Belog');
+        $workspaceArray[0] = LocalizationUtility::translate('live', 'Belog');
+        $workspaces = $this->objectManager->get(WorkspaceRepository::class)->findAll();
         /** @var \TYPO3\CMS\Belog\Domain\Model\Workspace $workspace */
         foreach ($workspaces as $workspace) {
             $workspaceArray[$workspace->getUid()] = $workspace->getUid() . ': ' . $workspace->getTitle();
@@ -305,12 +309,12 @@ class BackendLogController extends ActionController
     protected function createPageDepthOptions()
     {
         $options = [
-            0 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_0', 'lang'),
-            1 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_1', 'lang'),
-            2 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_2', 'lang'),
-            3 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_3', 'lang'),
-            4 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_4', 'lang'),
-            999 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_infi', 'lang')
+            0 => LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_0', 'lang'),
+            1 => LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_1', 'lang'),
+            2 => LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_2', 'lang'),
+            3 => LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_3', 'lang'),
+            4 => LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_4', 'lang'),
+            999 => LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_infi', 'lang')
         ];
         return $options;
     }
index 1a7ad96..49211c1 100644 (file)
@@ -40,7 +40,7 @@ class Constraint
      *
      * @var int
      */
-    protected $workspaceUid = \TYPO3\CMS\Belog\Domain\Model\Workspace::UID_ANY_WORKSPACE;
+    protected $workspaceUid = Workspace::UID_ANY_WORKSPACE;
 
     /**
      * Selected time frame
index bad0076..df92d91 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Belog\Domain\Model;
 
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
+
 /**
  * A sys log entry
  * This model is 'complete': All current database properties are in there.
@@ -22,7 +24,7 @@ namespace TYPO3\CMS\Belog\Domain\Model;
  * @todo : This should be stuffed to some more central place
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class LogEntry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+class LogEntry extends AbstractEntity
 {
     /**
      * Storage page ID of the log entry
index 623a20c..dcc9e63 100644 (file)
 
 namespace TYPO3\CMS\Belog\Domain\Model;
 
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
+
 /**
  * Stub model for workspaces - only properties required for belog module are added currently
  *
  * @todo : This should be extended and put at some more central place
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class Workspace extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+class Workspace extends AbstractEntity
 {
     /**
      * @var int
index 7b85e6e..33e24ff 100644 (file)
 
 namespace TYPO3\CMS\Belog\Domain\Repository;
 
+use TYPO3\CMS\Backend\Tree\View\PageTreeView;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Belog\Domain\Model\Constraint;
 use TYPO3\CMS\Belog\Domain\Model\LogEntry;
+use TYPO3\CMS\Belog\Domain\Model\Workspace;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
+use TYPO3\CMS\Extbase\Persistence\QueryInterface;
+use TYPO3\CMS\Extbase\Persistence\Repository;
 
 /**
  * Sys log entry repository
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+class LogEntryRepository extends Repository
 {
     /**
      * Backend users, with UID as key
@@ -40,7 +47,7 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
     {
         $this->beUserList = $this->getBackendUsers();
         /** @var \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $defaultQuerySettings */
-        $defaultQuerySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class);
+        $defaultQuerySettings = $this->objectManager->get(QuerySettingsInterface::class);
         $defaultQuerySettings->setRespectStoragePage(false);
         $this->setDefaultQuerySettings($defaultQuerySettings);
     }
@@ -51,14 +58,14 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
      * @param \TYPO3\CMS\Belog\Domain\Model\Constraint $constraint
      * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
      */
-    public function findByConstraint(\TYPO3\CMS\Belog\Domain\Model\Constraint $constraint)
+    public function findByConstraint(Constraint $constraint)
     {
         $query = $this->createQuery();
         $queryConstraints = $this->createQueryConstraints($query, $constraint);
         if (!empty($queryConstraints)) {
             $query->matching($query->logicalAnd($queryConstraints));
         }
-        $query->setOrderings(['uid' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING]);
+        $query->setOrderings(['uid' => QueryInterface::ORDER_DESCENDING]);
         $query->setLimit($constraint->getNumber());
         return $query->execute();
     }
@@ -70,13 +77,13 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
      * @param \TYPO3\CMS\Belog\Domain\Model\Constraint $constraint
      * @return array|\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface[]
      */
-    protected function createQueryConstraints(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, \TYPO3\CMS\Belog\Domain\Model\Constraint $constraint)
+    protected function createQueryConstraints(QueryInterface $query, Constraint $constraint)
     {
         $queryConstraints = [];
         // User / group handling
         $this->addUsersAndGroupsToQueryConstraints($constraint, $query, $queryConstraints);
         // Workspace
-        if ($constraint->getWorkspaceUid() != \TYPO3\CMS\Belog\Domain\Model\Workspace::UID_ANY_WORKSPACE) {
+        if ($constraint->getWorkspaceUid() != Workspace::UID_ANY_WORKSPACE) {
             $queryConstraints[] = $query->equals('workspace', $constraint->getWorkspaceUid());
         }
         // Action (type):
@@ -102,13 +109,13 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
      * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query
      * @param array $queryConstraints the query constraints to add to, will be modified
      */
-    protected function addPageTreeConstraintsToQuery(\TYPO3\CMS\Belog\Domain\Model\Constraint $constraint, \TYPO3\CMS\Extbase\Persistence\QueryInterface $query, array &$queryConstraints)
+    protected function addPageTreeConstraintsToQuery(Constraint $constraint, QueryInterface $query, array &$queryConstraints)
     {
         $pageIds = [];
         // Check if we should get a whole tree of pages and not only a single page
         if ($constraint->getDepth() > 0) {
             /** @var \TYPO3\CMS\Backend\Tree\View\PageTreeView $pageTree */
-            $pageTree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\View\PageTreeView::class);
+            $pageTree = GeneralUtility::makeInstance(PageTreeView::class);
             $pageTree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(Permission::PAGE_SHOW));
             $pageTree->makeHTML = 0;
             $pageTree->fieldArray = ['uid'];
@@ -130,7 +137,7 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
      * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query
      * @param array $queryConstraints the query constraints to add to, will be modified
      */
-    protected function addUsersAndGroupsToQueryConstraints(\TYPO3\CMS\Belog\Domain\Model\Constraint $constraint, \TYPO3\CMS\Extbase\Persistence\QueryInterface $query, array &$queryConstraints)
+    protected function addUsersAndGroupsToQueryConstraints(Constraint $constraint, QueryInterface $query, array &$queryConstraints)
     {
         $userOrGroup = $constraint->getUserOrGroup();
         if ($userOrGroup === '') {
@@ -141,7 +148,7 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
             $groupId = (int)substr($userOrGroup, 3);
             $userIds = [];
             foreach ($this->beUserList as $userId => $userData) {
-                if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($userData['usergroup_cached_list'], $groupId)) {
+                if (GeneralUtility::inList($userData['usergroup_cached_list'], $groupId)) {
                     $userIds[] = $userId;
                 }
             }
@@ -187,6 +194,6 @@ class LogEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
      */
     protected function getBackendUsers()
     {
-        return \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
+        return BackendUtility::getUserNames();
     }
 }
index a110a2d..16f4e51 100644 (file)
 
 namespace TYPO3\CMS\Belog\Domain\Repository;
 
+use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
+use TYPO3\CMS\Extbase\Persistence\Repository;
+
 /**
  * Repository for workspaces
  * @todo This should be moved to EXT:workspaces if EXT:belog works no matter if workspaces are installed or not
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class WorkspaceRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+class WorkspaceRepository extends Repository
 {
     /**
      * Initializes the repository.
@@ -28,7 +31,7 @@ class WorkspaceRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
     public function initializeObject()
     {
         /** @var \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $querySettings */
-        $querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class);
+        $querySettings = $this->objectManager->get(QuerySettingsInterface::class);
         $querySettings->setRespectStoragePage(false);
         $this->setDefaultQuerySettings($querySettings);
     }
index 8437752..a192b1c 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Belog\Module;
 
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Routing\Route;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Core\Bootstrap;
 
@@ -49,7 +50,7 @@ class BackendLogModuleBootstrap
         ];
         $options['moduleName'] = 'system_BelogLog';
 
-        $route = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\Route::class, '/system/BelogLog/', $options);
+        $route = GeneralUtility::makeInstance(Route::class, '/system/BelogLog/', $options);
         $serverRequest = $serverRequest->withAttribute('route', $route);
         $extbaseBootstrap = GeneralUtility::makeInstance(Bootstrap::class);
         return $extbaseBootstrap->handleBackendRequest($serverRequest);
index 8e68088..6b71630 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Belog\ViewHelpers\Form;
 
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelper;
+
 /**
  * Extends the usual select ViewHelper, but additionally translates
  * the select option labels
@@ -25,7 +28,7 @@ namespace TYPO3\CMS\Belog\ViewHelpers\Form;
  * Will lookup number.200 (or whatever optionValue is given) in locallang database
  * @internal
  */
-class TranslateLabelSelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelper
+class TranslateLabelSelectViewHelper extends SelectViewHelper
 {
     /**
      * Initialize arguments.
@@ -65,7 +68,7 @@ class TranslateLabelSelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\S
             return '';
         }
         $labelKey = $this->hasArgument('optionLabelPrefix') ? $this->arguments['optionLabelPrefix'] . $label : $label;
-        $translatedLabel = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($labelKey, $this->renderingContext->getControllerContext()->getRequest()->getControllerExtensionName());
+        $translatedLabel = LocalizationUtility::translate($labelKey, $this->renderingContext->getControllerContext()->getRequest()->getControllerExtensionName());
         return $translatedLabel ?: $label;
     }
 }
index a23defd..b531c4c 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Belog\Tests\Unit\Domain\Model;
 
+use TYPO3\CMS\Belog\Domain\Model\Constraint;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -30,7 +31,7 @@ class ConstraintTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->subject = new \TYPO3\CMS\Belog\Domain\Model\Constraint();
+        $this->subject = new Constraint();
     }
 
     /**
index 2f8750a..1629f6f 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Belog\Tests\Unit\Domain\Model;
 
+use TYPO3\CMS\Belog\Domain\Model\LogEntry;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -30,7 +31,7 @@ class LogEntryTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->subject = new \TYPO3\CMS\Belog\Domain\Model\LogEntry();
+        $this->subject = new LogEntry();
     }
 
     /**
index bd5f61c..6939ff7 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Belog\Tests\Unit\Domain\Repository;
 
+use TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
+use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -28,12 +31,12 @@ class LogEntryRepositoryTest extends UnitTestCase
     public function initializeObjectSetsRespectStoragePidToFalse()
     {
         /** @var \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings $querySettings */
-        $querySettings = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class)->getMock();
-        $objectManager = $this->getMockBuilder(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class)->getMock();
-        $objectManager->expects(self::any())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class)->willReturn($querySettings);
+        $querySettings = $this->getMockBuilder(QuerySettingsInterface::class)->getMock();
+        $objectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
+        $objectManager->expects(self::any())->method('get')->with(QuerySettingsInterface::class)->willReturn($querySettings);
         $querySettings->expects(self::atLeastOnce())->method('setRespectStoragePage')->with(false);
         /** @var \TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository|\PHPUnit\Framework\MockObject\MockObject $subject */
-        $subject = $this->getMockBuilder(\TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository::class)
+        $subject = $this->getMockBuilder(LogEntryRepository::class)
             ->setMethods(['setDefaultQuerySettings', 'getBackendUsers'])
             ->setConstructorArgs([$objectManager])
             ->getMock();
index aedbbb0..0782f4f 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Belog\Tests\Unit\Domain\Repository;
 
+use TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
+use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -27,11 +30,11 @@ class WorkspaceRepositoryTest extends UnitTestCase
      */
     public function initializeObjectSetsRespectStoragePidToFalse()
     {
-        $querySettings = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class)->getMock();
-        $objectManager = $this->getMockBuilder(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class)->getMock();
-        $objectManager->expects(self::any())->method('get')->with(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class)->willReturn($querySettings);
+        $querySettings = $this->getMockBuilder(QuerySettingsInterface::class)->getMock();
+        $objectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
+        $objectManager->expects(self::any())->method('get')->with(QuerySettingsInterface::class)->willReturn($querySettings);
         $querySettings->expects(self::atLeastOnce())->method('setRespectStoragePage')->with(false);
-        $subject = $this->getMockBuilder(\TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository::class)
+        $subject = $this->getMockBuilder(WorkspaceRepository::class)
             ->setMethods(['setDefaultQuerySettings'])
             ->setConstructorArgs([$objectManager])
             ->getMock();
index 9e0a259..6c74981 100644 (file)
@@ -17,7 +17,9 @@ namespace TYPO3\CMS\Beuser\Controller;
 
 use TYPO3\CMS\Backend\Authentication\Event\SwitchUserEvent;
 use TYPO3\CMS\Backend\Authentication\PasswordReset;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
+use TYPO3\CMS\Beuser\Domain\Model\Demand;
 use TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository;
 use TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository;
 use TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository;
@@ -31,6 +33,9 @@ use TYPO3\CMS\Core\Session\SessionManager;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
+use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
+use TYPO3\CMS\Extbase\Mvc\RequestInterface;
+use TYPO3\CMS\Extbase\Mvc\ResponseInterface;
 use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
@@ -96,14 +101,14 @@ class BackendUserController extends ActionController
      * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
      */
-    public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
+    public function processRequest(RequestInterface $request, ResponseInterface $response)
     {
         $this->moduleData = $this->moduleDataStorageService->loadModuleData();
         // We "finally" persist the module data.
         try {
             parent::processRequest($request, $response);
             $this->moduleDataStorageService->persistModuleData($this->moduleData);
-        } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
+        } catch (StopActionException $e) {
             $this->moduleDataStorageService->persistModuleData($this->moduleData);
             throw $e;
         }
@@ -128,7 +133,7 @@ class BackendUserController extends ActionController
      *
      * @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
      */
-    public function indexAction(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand = null)
+    public function indexAction(Demand $demand = null)
     {
         if ($demand === null) {
             $demand = $this->moduleData->getDemand();
@@ -290,7 +295,7 @@ class BackendUserController extends ActionController
      * @param \TYPO3\CMS\Beuser\Domain\Model\BackendUser $backendUser
      * @param string $sessionId
      */
-    protected function terminateBackendUserSessionAction(\TYPO3\CMS\Beuser\Domain\Model\BackendUser $backendUser, $sessionId)
+    protected function terminateBackendUserSessionAction(BackendUser $backendUser, $sessionId)
     {
         $sessionBackend = $this->getSessionBackend();
         $success = $sessionBackend->remove($sessionId);
@@ -308,7 +313,7 @@ class BackendUserController extends ActionController
      */
     protected function switchUser($switchUser)
     {
-        $targetUser = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', $switchUser);
+        $targetUser = BackendUtility::getRecord('be_users', $switchUser);
         if (is_array($targetUser) && $this->getBackendUserAuthentication()->isAdmin()) {
             // Set backend user listing module as starting module for switchback
             $this->getBackendUserAuthentication()->uc['startModuleOnFirstLogin'] = 'system_BeuserTxBeuser';
index 56141d1..d404155 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Beuser\Controller;
 
+use TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository;
 use TYPO3\CMS\Beuser\Service\UserInformationService;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
@@ -33,7 +34,7 @@ class BackendUserGroupController extends ActionController
     /**
      * @param \TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository $backendUserGroupRepository
      */
-    public function injectBackendUserGroupRepository(\TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository $backendUserGroupRepository)
+    public function injectBackendUserGroupRepository(BackendUserGroupRepository $backendUserGroupRepository)
     {
         $this->backendUserGroupRepository = $backendUserGroupRepository;
     }
index d1779a7..7d6d9b8 100644 (file)
 namespace TYPO3\CMS\Beuser\Domain\Model;
 
 use TYPO3\CMS\Extbase\Annotation as Extbase;
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 
 /**
  * Model for backend user group
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+class BackendUserGroup extends AbstractEntity
 {
     /**
      * @var string
index 72a5b5c..ee0756b 100644 (file)
 
 namespace TYPO3\CMS\Beuser\Domain\Model;
 
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
+
 /**
  * Demand filter for listings
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class Demand extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+class Demand extends AbstractEntity
 {
     /**
      * @var int
index 415aad3..ebfd6db 100644 (file)
@@ -34,7 +34,7 @@ class ModuleData
     /**
      * @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
      */
-    public function injectDemand(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand)
+    public function injectDemand(Demand $demand)
     {
         $this->demand = $demand;
     }
@@ -50,7 +50,7 @@ class ModuleData
     /**
      * @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
      */
-    public function setDemand(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand)
+    public function setDemand(Demand $demand)
     {
         $this->demand = $demand;
     }
index 35c2596..2ddd93d 100644 (file)
 
 namespace TYPO3\CMS\Beuser\Domain\Repository;
 
+use TYPO3\CMS\Extbase\Persistence\QueryInterface;
+use TYPO3\CMS\Extbase\Persistence\Repository;
+
 /**
  * Repository for \TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class BackendUserGroupRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+class BackendUserGroupRepository extends Repository
 {
     /**
      * @var array Default order is by title ascending
      */
     protected $defaultOrderings = [
-        'title' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
+        'title' => QueryInterface::ORDER_ASCENDING
     ];
 
     /**
index 5982905..53e4599 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Beuser\Hook;
 
 use TYPO3\CMS\Backend\Controller\BackendController;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -34,7 +35,7 @@ class BackendControllerHook
     public function addJavaScript(array $configuration, BackendController $backendController)
     {
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $this->getPageRenderer()->addInlineSetting('AccessPermissions', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('system_BeuserTxPermission'));
     }
 
index 6433b57..7d1c55a 100644 (file)
 
 namespace TYPO3\CMS\Beuser\Hook;
 
+use TYPO3\CMS\Backend\Routing\UriBuilder;
+use TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository;
 use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
 
 /**
  * Backend user switchback, for logoff_pre_processing hook within
@@ -37,11 +40,11 @@ class SwitchBackUserHook
     public function switchBack($params, AbstractUserAuthentication $authentication)
     {
         if ($this->isAHandledBackendSession($authentication)) {
-            $objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-            $backendUserSessionRepository = $objectManager->get(\TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository::class);
+            $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
+            $backendUserSessionRepository = $objectManager->get(BackendUserSessionRepository::class);
             $backendUserSessionRepository->switchBackToOriginalUser($authentication);
             /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-            $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+            $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
             HttpUtility::redirect((string)$uriBuilder->buildUriFromRoute('main'));
         }
     }
index d8539dc..3463a3d 100644 (file)
@@ -17,13 +17,15 @@ namespace TYPO3\CMS\Beuser\Service;
 
 use TYPO3\CMS\Beuser\Domain\Model\Demand;
 use TYPO3\CMS\Beuser\Domain\Model\ModuleData;
+use TYPO3\CMS\Core\SingletonInterface;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 
 /**
  * Module data storage service.
  * Used to store and retrieve module state (eg. checkboxes, selections).
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class ModuleDataStorageService implements \TYPO3\CMS\Core\SingletonInterface
+class ModuleDataStorageService implements SingletonInterface
 {
     /**
      * @var string
@@ -38,7 +40,7 @@ class ModuleDataStorageService implements \TYPO3\CMS\Core\SingletonInterface
     /**
      * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
      */
-    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
+    public function injectObjectManager(ObjectManagerInterface $objectManager)
     {
         $this->objectManager = $objectManager;
     }
@@ -66,7 +68,7 @@ class ModuleDataStorageService implements \TYPO3\CMS\Core\SingletonInterface
      *
      * @param \TYPO3\CMS\Beuser\Domain\Model\ModuleData $moduleData
      */
-    public function persistModuleData(\TYPO3\CMS\Beuser\Domain\Model\ModuleData $moduleData)
+    public function persistModuleData(ModuleData $moduleData)
     {
         $GLOBALS['BE_USER']->pushModuleData(self::KEY, serialize($moduleData));
     }
index a2035f5..302c91d 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Beuser\Tests\Unit\Domain\Model;
 
+use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -30,7 +31,7 @@ class BackendUserTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->subject = new \TYPO3\CMS\Beuser\Domain\Model\BackendUser();
+        $this->subject = new BackendUser();
     }
 
     /**
index b3f94e7..7316c9a 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Beuser\Tests\Unit\Domain\Model;
 
+use TYPO3\CMS\Beuser\Domain\Model\Demand;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -30,7 +31,7 @@ class DemandTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->subject = new \TYPO3\CMS\Beuser\Domain\Model\Demand();
+        $this->subject = new Demand();
     }
 
     /**
@@ -38,7 +39,7 @@ class DemandTest extends UnitTestCase
      */
     public function setUserTypeAllExpectedValueForInt()
     {
-        $userType = \TYPO3\CMS\Beuser\Domain\Model\Demand::ALL;
+        $userType = Demand::ALL;
         $this->subject->setUserType($userType);
         self::assertSame($this->subject->getUserType(), $userType);
     }
@@ -48,7 +49,7 @@ class DemandTest extends UnitTestCase
      */
     public function setUserTypeAdminOnlyExpectedValueForInt()
     {
-        $userType = \TYPO3\CMS\Beuser\Domain\Model\Demand::USERTYPE_ADMINONLY;
+        $userType = Demand::USERTYPE_ADMINONLY;
         $this->subject->setUserType($userType);
         self::assertSame($this->subject->getUserType(), $userType);
     }
@@ -58,7 +59,7 @@ class DemandTest extends UnitTestCase
      */
     public function setUserTypeUserOnlyExpectedValueForInt()
     {
-        $userType = \TYPO3\CMS\Beuser\Domain\Model\Demand::USERTYPE_USERONLY;
+        $userType = Demand::USERTYPE_USERONLY;
         $this->subject->setUserType($userType);
         self::assertSame($this->subject->getUserType(), $userType);
     }
@@ -68,7 +69,7 @@ class DemandTest extends UnitTestCase
      */
     public function setStatusAllExpectedValueForInt()
     {
-        $status = \TYPO3\CMS\Beuser\Domain\Model\Demand::ALL;
+        $status = Demand::ALL;
         $this->subject->setStatus($status);
         self::assertSame($this->subject->getStatus(), $status);
     }
@@ -78,7 +79,7 @@ class DemandTest extends UnitTestCase
      */
     public function setStatusActiveExpectedValueForInt()
     {
-        $status = \TYPO3\CMS\Beuser\Domain\Model\Demand::STATUS_ACTIVE;
+        $status = Demand::STATUS_ACTIVE;
         $this->subject->setStatus($status);
         self::assertSame($this->subject->getStatus(), $status);
     }
@@ -88,7 +89,7 @@ class DemandTest extends UnitTestCase
      */
     public function setStatusInactiveExpectedValueForInt()
     {
-        $status = \TYPO3\CMS\Beuser\Domain\Model\Demand::STATUS_INACTIVE;
+        $status = Demand::STATUS_INACTIVE;
         $this->subject->setStatus($status);
         self::assertSame($this->subject->getStatus(), $status);
     }
@@ -98,7 +99,7 @@ class DemandTest extends UnitTestCase
      */
     public function setLoginAllExpectedValueForInt()
     {
-        $login = \TYPO3\CMS\Beuser\Domain\Model\Demand::ALL;
+        $login = Demand::ALL;
         $this->subject->setLogins($login);
         self::assertSame($this->subject->getLogins(), $login);
     }
@@ -108,7 +109,7 @@ class DemandTest extends UnitTestCase
      */
     public function setLoginNoneExpectedValueForInt()
     {
-        $login = \TYPO3\CMS\Beuser\Domain\Model\Demand::LOGIN_NONE;
+        $login = Demand::LOGIN_NONE;
         $this->subject->setLogins($login);
         self::assertSame($this->subject->getLogins(), $login);
     }
@@ -118,7 +119,7 @@ class DemandTest extends UnitTestCase
      */
     public function setLoginxSameExpectedValueForInt()
     {
-        $login = \TYPO3\CMS\Beuser\Domain\Model\Demand::LOGIN_SOME;
+        $login = Demand::LOGIN_SOME;
         $this->subject->setLogins($login);
         self::assertSame($this->subject->getLogins(), $login);
     }
index 8ee2ec2..f5d28dd 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Beuser\Tests\Unit\Domain\Repository;
 
+use TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -27,7 +29,7 @@ class BackendUserRepositoryTest extends UnitTestCase
      */
     public function classCanBeInstantiated()
     {
-        $objectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
-        new \TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository($objectManager);
+        $objectManager = $this->createMock(ObjectManagerInterface::class);
+        new BackendUserRepository($objectManager);
     }
 }
index b24b011..808c29b 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Beuser\Tests\Unit\Domain\Repository;
 
+use TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -27,7 +29,7 @@ class BackendUserSessionRepositoryTest extends UnitTestCase
      */
     public function classCanBeInstantiated()
     {
-        $objectManager = $this->getMockBuilder(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class)->getMock();
-        new \TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository($objectManager);
+        $objectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
+        new BackendUserSessionRepository($objectManager);
     }
 }
index a42a400..e599eee 100644 (file)
 
 namespace TYPO3\CMS\Beuser\Tests\Unit\Service;
 
+use TYPO3\CMS\Beuser\Domain\Model\ModuleData;
 use TYPO3\CMS\Beuser\Service\ModuleDataStorageService;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -29,17 +32,17 @@ class ModuleDataStorageServiceTest extends UnitTestCase
     public function loadModuleDataReturnsModuleDataObjectForEmptyModuleData()
     {
         // Simulate empty module data
-        $GLOBALS['BE_USER'] = $this->createMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
+        $GLOBALS['BE_USER'] = $this->createMock(BackendUserAuthentication::class);
         $GLOBALS['BE_USER']->uc = [];
         $GLOBALS['BE_USER']->uc['moduleData'] = [];
 
         $subject = new ModuleDataStorageService();
-        $objectManagerMock = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-        $moduleDataMock = $this->createMock(\TYPO3\CMS\Beuser\Domain\Model\ModuleData::class);
+        $objectManagerMock = $this->createMock(ObjectManager::class);
+        $moduleDataMock = $this->createMock(ModuleData::class);
         $objectManagerMock
             ->expects(self::once())
             ->method('get')
-            ->with(\TYPO3\CMS\Beuser\Domain\Model\ModuleData::class)
+            ->with(ModuleData::class)
             ->willReturn($moduleDataMock);
         $subject->injectObjectManager($objectManagerMock);
 
index cc94914..8b15a7d 100644 (file)
@@ -27,6 +27,8 @@ use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\Container\Container;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Controller\ArgumentTestController;
+use TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Domain\Model\Model;
+use TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Domain\Model\ModelDto;
 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
 
 /**
@@ -76,7 +78,7 @@ class ActionControllerArgumentTest extends FunctionalTestCase
             // regular models
             'preset model' => [
                 'inputPresetModel',
-                ['preset' => (new Fixture\Domain\Model\Model())->setValue('preset')],
+                ['preset' => (new Model())->setValue('preset')],
                 'validateModel',
                 [
                     'form/model/value' => 'preset',
@@ -85,7 +87,7 @@ class ActionControllerArgumentTest extends FunctionalTestCase
             ],
             'preset DTO' => [
                 'inputPresetDto',
-                ['preset' => (new Fixture\Domain\Model\ModelDto())->setValue('preset')],
+                ['preset' => (new ModelDto())->setValue('preset')],
                 'validateDto',
                 [
                     'form/dto/value' => 'preset',
index 547f5a5..051f76c 100644 (file)
 
 namespace TYPO3\CMS\Extensionmanager\Controller;
 
+use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
 /**
  * Abstract action controller.
  * @internal This class is a specific controller implementation and is not considered part of the Public TYPO3 API.
  */
-class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
+class AbstractController extends ActionController
 {
     const TRIGGER_RefreshModuleMenu = 'refreshModuleMenu';
     const TRIGGER_RefreshTopbar = 'refreshTopbar';
index 92cfd2e..a4b87cf 100644 (file)
 
 namespace TYPO3\CMS\Extensionmanager\Controller;
 
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Package\Exception;
+use TYPO3\CMS\Core\Package\Exception\PackageStatesFileNotWritableException;
 use TYPO3\CMS\Core\Registry;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
 use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
 use TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility;
 use TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility;
@@ -104,8 +109,8 @@ class ActionController extends AbstractController
                     $this->redirect('unresolvedDependencies', 'List', null, ['extensionKey' => $extensionKey]);
                 }
             }
-        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException|\TYPO3\CMS\Core\Package\Exception\PackageStatesFileNotWritableException $e) {
-            $this->addFlashMessage($e->getMessage(), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+        } catch (ExtensionManagerException|PackageStatesFileNotWritableException $e) {
+            $this->addFlashMessage($e->getMessage(), '', FlashMessage::ERROR);
         }
         $this->redirect('index', 'List', null, [
             self::TRIGGER_RefreshModuleMenu => true,
@@ -135,7 +140,7 @@ class ActionController extends AbstractController
         try {
             $this->installUtility->removeExtension($extension);
             $this->addFlashMessage(
-                \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
+                LocalizationUtility::translate(
                     'extensionList.remove.message',
                     'extensionmanager',
                     [
@@ -143,8 +148,8 @@ class ActionController extends AbstractController
                     ]
                 )
             );
-        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException|\TYPO3\CMS\Core\Package\Exception $e) {
-            $this->addFlashMessage($e->getMessage(), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+        } catch (ExtensionManagerException|Exception $e) {
+            $this->addFlashMessage($e->getMessage(), '', FlashMessage::ERROR);
         }
 
         return '';
index 65a8ae4..c6bb381 100644 (file)
 namespace TYPO3\CMS\Extensionmanager\Controller;
 
 use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
+use TYPO3\CMS\Core\Messaging\AbstractMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\View\JsonView;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
 use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
 use TYPO3\CMS\Extensionmanager\Utility\DownloadUtility;
 use TYPO3\CMS\Fluid\View\TemplateView;
@@ -206,7 +209,7 @@ class DownloadController extends AbstractController
      */
     public function installDistributionAction(Extension $extension)
     {
-        if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('impexp')) {
+        if (!ExtensionManagementUtility::isLoaded('impexp')) {
             $this->forward('distributions', 'List');
         }
         [$result, $errorMessages] = $this->installFromTer($extension);
@@ -220,7 +223,7 @@ class DownloadController extends AbstractController
                             'extensionmanager',
                             [$extensionKey]
                         ),
-                        \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR
+                        AbstractMessage::ERROR
                     );
                 }
             }
@@ -267,7 +270,7 @@ class DownloadController extends AbstractController
         if (!$extension instanceof Extension) {
             $extension = $this->extensionRepository->findHighestAvailableVersion($extensionKey);
         }
-        $installedExtensions = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getLoadedExtensionListArray();
+        $installedExtensions = ExtensionManagementUtility::getLoadedExtensionListArray();
         try {
             if (in_array($extensionKey, $installedExtensions, true)) {
                 // To resolve new dependencies the extension is installed again
@@ -341,7 +344,7 @@ class DownloadController extends AbstractController
             if (($result = $this->managementService->installExtension($extension)) === false) {
                 $errorMessages = $this->managementService->getDependencyErrors();
             }
-        } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException $e) {
+        } catch (ExtensionManagerException $e) {
             $errorMessages = [
                 $extension->getExtensionKey() => [
                     [
index 6e14edf..21cd152 100644 (file)
 
 namespace TYPO3\CMS\Extensionmanager\Controller;
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Extbase\Mvc\View\JsonView;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository;
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
 use TYPO3\CMS\Extensionmanager\Utility\ListUtility;
 use TYPO3\CMS\Extensionmanager\Utility\Repository\Helper;
 
@@ -98,7 +100,7 @@ class UpdateFromTerController extends AbstractController
         if ($this->extensionRepository->countAll() === 0 || $forceUpdateCheck) {
             try {
                 $updated = $this->repositoryHelper->updateExtList();
-            } catch (\TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException $e) {
+            } catch (ExtensionManagerException $e) {
                 $errorMessage = $e->getMessage();
             }
         }
@@ -110,7 +112,7 @@ class UpdateFromTerController extends AbstractController
             $lastUpdatedSince = $this->getLanguageService()->sL('LLL:EXT:extensionmanager/Resources/Private/Language/locallang.xlf:extensionList.updateFromTer.never');
             $lastUpdateTime = date($timeFormat);
         } else {
-            $lastUpdatedSince = \TYPO3\CMS\Backend\Utility\BackendUtility::calcAge(
+            $lastUpdatedSince = BackendUtility::calcAge(
                 time() - $lastUpdateTime->format('U'),
                 $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.minutesHoursDaysYears')
             );
index ad751f3..5792d0f 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
 use TYPO3\CMS\Core\Core\Environment;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
 use TYPO3\CMS\Extensionmanager\Exception\DependencyConfigurationNotFoundException;
 use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
@@ -162,7 +163,7 @@ class UploadExtensionFileController extends AbstractController
                     $this->redirect('unresolvedDependencies', 'List', null, ['extensionKey' => $extensionData['extKey']]);
                 }
             }
-        } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $exception) {
+        } catch (StopActionException $exception) {
             throw $exception;
         } catch (DependencyConfigurationNotFoundException $exception) {
             $this->addFlashMessage($exception->getMessage(), '', FlashMessage::ERROR);
index d11fd89..aece837 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Extensionmanager\Domain\Model;
 
 use TYPO3\CMS\Core\Core\Environment;
+use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility;
@@ -247,7 +248,7 @@ class Extension extends AbstractEntity
     public function getCategoryIndexFromStringOrNumber($category)
     {
         $categoryIndex = 4;
-        if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($category)) {
+        if (MathUtility::canBeInterpretedAsInteger($category)) {
             $categoryIndex = (int)$category;
             if ($categoryIndex < 0 || $categoryIndex > 10) {
                 $categoryIndex = 4;
index 913a83c..3b8f11c 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Platform\PlatformInformation;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
 use TYPO3\CMS\Extbase\Persistence\Generic\Query;
 use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
 use TYPO3\CMS\Extbase\Persistence\QueryInterface;
@@ -194,7 +195,7 @@ class ExtensionRepository extends Repository
             ->execute()
             ->fetchAll();
 
-        $dataMapper = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class);
+        $dataMapper = $this->objectManager->get(DataMapper::class);
         return $dataMapper->map(Extension::class, $result);
     }
 
index 09a8bae..c3b648d 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Extensionmanager\Report;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository;
 use TYPO3\CMS\Extensionmanager\Utility\ListUtility;
 use TYPO3\CMS\Reports\Status;
@@ -146,7 +147,7 @@ class ExtensionStatus implements StatusProviderInterface
         foreach ($extensionInformation as $extensionKey => $information) {
             if (
                 array_key_exists('terObject', $information)
-                && $information['terObject'] instanceof \TYPO3\CMS\Extensionmanager\Domain\Model\Extension
+                && $information['terObject'] instanceof Extension
             ) {
                 /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $terObject */
                 $terObject = $information['terObject'];
index 9f3d54c..bc85d8d 100644 (file)
@@ -48,7 +48,7 @@ class TerUtility
         }
         $extensionPath = strtolower($extensionKey);
         $mirrorUrl .= $extensionPath[0] . '/' . $extensionPath[1] . '/' . $extensionPath . '_' . $version . '.t3x';
-        $t3x = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($mirrorUrl);
+        $t3x = GeneralUtility::getUrl($mirrorUrl);
         $md5 = md5($t3x);
         if ($t3x === false) {
             throw new ExtensionManagerException(sprintf('The T3X file "%s" could not be fetched. Possible reasons: network problems, allow_url_fopen is off, cURL is not enabled in Install Tool.', $mirrorUrl), 1334426097);
index 0e8384c..a805c95 100644 (file)
@@ -23,6 +23,11 @@ use TYPO3\CMS\Extensionmanager\Domain\Model\Dependency;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
 use TYPO3\CMS\Extensionmanager\Exception;
+use TYPO3\CMS\Extensionmanager\Exception\MissingExtensionDependencyException;
+use TYPO3\CMS\Extensionmanager\Exception\MissingVersionDependencyException;
+use TYPO3\CMS\Extensionmanager\Exception\UnresolvedDependencyException;
+use TYPO3\CMS\Extensionmanager\Exception\UnresolvedPhpDependencyException;
+use TYPO3\CMS\Extensionmanager\Exception\UnresolvedTypo3DependencyException;
 use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
 
 /**
@@ -151,7 +156,7 @@ class DependencyUtility implements SingletonInterface
                         $this->checkExtensionDependency($dependency);
                     }
                 }
-            } catch (Exception\UnresolvedDependencyException $e) {
+            } catch (UnresolvedDependencyException $e) {
                 if (in_array($identifier, Dependency::$specialDependencies)) {
                     $extensionKey = $extension->getExtensionKey();
                 } else {
@@ -200,19 +205,19 @@ class DependencyUtility implements SingletonInterface
         $lowerCaseIdentifier = strtolower($dependency->getIdentifier());
         if ($lowerCaseIdentifier === 'typo3') {
             if (!($dependency->getLowestVersion() === '') && version_compare(VersionNumberUtility::getNumericTypo3Version(), $dependency->getLowestVersion()) === -1) {
-                throw new Exception\UnresolvedTypo3DependencyException(
+                throw new UnresolvedTypo3DependencyException(
                     'Your TYPO3 version is lower than this extension requires. It requires TYPO3 versions ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion(),
                     1399144499
                 );
             }
             if (!($dependency->getHighestVersion() === '') && version_compare($dependency->getHighestVersion(), VersionNumberUtility::getNumericTypo3Version()) === -1) {
-                throw new Exception\UnresolvedTypo3DependencyException(
+                throw new UnresolvedTypo3DependencyException(
                     'Your TYPO3 version is higher than this extension requires. It requires TYPO3 versions ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion(),
                     1399144521
                 );
             }
         } else {
-            throw new Exception\UnresolvedTypo3DependencyException(
+            throw new UnresolvedTypo3DependencyException(
                 'checkTypo3Dependency can only check TYPO3 dependencies. Found dependency with identifier "' . $dependency->getIdentifier() . '"',
                 1399144551
             );
@@ -232,19 +237,19 @@ class DependencyUtility implements SingletonInterface
         $lowerCaseIdentifier = strtolower($dependency->getIdentifier());
         if ($lowerCaseIdentifier === 'php') {
             if (!($dependency->getLowestVersion() === '') && version_compare(PHP_VERSION, $dependency->getLowestVersion()) === -1) {
-                throw new Exception\UnresolvedPhpDependencyException(
+                throw new UnresolvedPhpDependencyException(
                     'Your PHP version is lower than necessary. You need at least PHP version ' . $dependency->getLowestVersion(),
                     1377977857
                 );
             }
             if (!($dependency->getHighestVersion() === '') && version_compare($dependency->getHighestVersion(), PHP_VERSION) === -1) {
-                throw new Exception\UnresolvedPhpDependencyException(
+                throw new UnresolvedPhpDependencyException(
                     'Your PHP version is higher than allowed. You can use PHP versions ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion(),
                     1377977856
                 );
             }
         } else {
-            throw new Exception\UnresolvedPhpDependencyException(
+            throw new UnresolvedPhpDependencyException(
                 'checkPhpDependency can only check PHP dependencies. Found dependency with identifier "' . $dependency->getIdentifier() . '"',
                 1377977858
             );
@@ -278,15 +283,15 @@ class DependencyUtility implements SingletonInterface
             if (version_compare($loadedVersion, $dependency->getHighestVersion()) === -1) {
                 try {
                     $this->getExtensionFromRepository($extensionKey, $dependency);
-                } catch (Exception\UnresolvedDependencyException $e) {
-                    throw new Exception\MissingVersionDependencyException(
+                } catch (UnresolvedDependencyException $e) {
+                    throw new MissingVersionDependencyException(
                         'The extension ' . $extensionKey . ' is installed in version ' . $loadedVersion
                             . ' but needed in version ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion() . ' and could not be fetched from TER',
                         1396302624
                     );
                 }
             } else {
-                throw new Exception\MissingVersionDependencyException(
+                throw new MissingVersionDependencyException(
                     'The extension ' . $extensionKey . ' is installed in version ' . $loadedVersion .
                     ' but needed in version ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion(),
                     1430561927
@@ -306,9 +311,9 @@ class DependencyUtility implements SingletonInterface
                     if (version_compare($availableVersion, $dependency->getHighestVersion()) === -1) {
                         try {
                             $this->getExtensionFromRepository($extensionKey, $dependency);
-                        } catch (Exception\MissingExtensionDependencyException $e) {
+                        } catch (MissingExtensionDependencyException $e) {
                             if (!$this->skipDependencyCheck) {
-                                throw new Exception\MissingVersionDependencyException(
+                                throw new MissingVersionDependencyException(
                                     'The extension ' . $extensionKey . ' is available in version ' . $availableVersion
                                     . ' but is needed in version ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion() . ' and could not be fetched from TER',
                                     1430560390
@@ -317,7 +322,7 @@ class DependencyUtility implements SingletonInterface
                         }
                     } else {
                         if (!$this->skipDependencyCheck) {
-                            throw new Exception\MissingVersionDependencyException(
+                            throw new MissingVersionDependencyException(
                                 'The extension ' . $extensionKey . ' is available in version ' . $availableVersion
                                 . ' but is needed in version ' . $dependency->getLowestVersion() . ' - ' . $dependency->getHighestVersion(),
                                 1430562374
@@ -385,12 +390,12 @@ class DependencyUtility implements SingletonInterface
         if (!$isExtensionDownloadableFromTer) {
             if (!$this->skipDependencyCheck) {
                 if ($this->extensionRepository->countAll() > 0) {
-                    throw new Exception\MissingExtensionDependencyException(
+                    throw new MissingExtensionDependencyException(
                         'The extension ' . $extensionKey . ' is not available from TER.',
                         1399161266
                     );
                 }
-                throw new Exception\MissingExtensionDependencyException(
+                throw new MissingExtensionDependencyException(
                     'The extension ' . $extensionKey . ' could not be checked. Please update your Extension-List from TYPO3 Extension Repository (TER).',
                     1430580308
                 );
@@ -401,7 +406,7 @@ class DependencyUtility implements SingletonInterface
         $isDownloadableVersionCompatible = $this->isDownloadableVersionCompatible($dependency);
         if (!$isDownloadableVersionCompatible) {
             if (!$this->skipDependencyCheck) {
-                throw new Exception\MissingVersionDependencyException(
+                throw new MissingVersionDependencyException(
                     'No compatible version found for extension ' . $extensionKey,
                     1399161284
                 );
@@ -412,7 +417,7 @@ class DependencyUtility implements SingletonInterface
         $latestCompatibleExtensionByIntegerVersionDependency = $this->getLatestCompatibleExtensionByIntegerVersionDependency($dependency);
         if (!$latestCompatibleExtensionByIntegerVersionDependency instanceof Extension) {
             if (!$this->skipDependencyCheck) {
-                throw new Exception\MissingExtensionDependencyException(
+                throw new MissingExtensionDependencyException(
                     'Could not resolve dependency for "' . $dependency->getIdentifier() . '"',
                     1399161302
                 );
@@ -591,7 +596,7 @@ class DependencyUtility implements SingletonInterface
                         if ($this->checkTypo3Dependency($dependency)) {
                             $suitableExtensions[] = $extension;
                         }
-                    } catch (Exception\UnresolvedTypo3DependencyException $e) {
+                    } catch (UnresolvedTypo3DependencyException $e) {
                     }
                     break;
                 }
index fb867e2..0431a10 100644 (file)
@@ -19,7 +19,13 @@ use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Platform\PlatformInformation;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\VersionNumberUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
+use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
+use TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository;
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
 use TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser;
+use TYPO3\CMS\Extensionmanager\Utility\Parser\XmlParserFactory;
 
 /**
  * Importer object for extension list
@@ -139,16 +145,16 @@ class ExtensionListUtility implements \SplObserver
     public function __construct()
     {
         /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
-        $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-        $this->repositoryRepository = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class);
-        $this->extensionRepository = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::class);
-        $this->extensionModel = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
+        $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
+        $this->repositoryRepository = $this->objectManager->get(RepositoryRepository::class);
+        $this->extensionRepository = $this->objectManager->get(ExtensionRepository::class);
+        $this->extensionModel = $this->objectManager->get(Extension::class);
         // @todo catch parser exception
-        $this->parser = \TYPO3\CMS\Extensionmanager\Utility\Parser\XmlParserFactory::getParserInstance('extension');
+        $this->parser = XmlParserFactory::getParserInstance('extension');
         if (is_object($this->parser)) {
             $this->parser->attach($this);
         } else {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
+            throw new ExtensionManagerException(
                 static::class . ': No XML parser available.',
                 1476108717
             );
index f0bb520..8609def 100644 (file)
@@ -19,6 +19,7 @@ use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
 use Symfony\Component\Finder\Finder;
+use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
 use TYPO3\CMS\Core\Configuration\SiteConfiguration;
 use TYPO3\CMS\Core\Core\Bootstrap;
@@ -27,12 +28,16 @@ use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
 use TYPO3\CMS\Core\Package\Event\AfterPackageActivationEvent;
 use TYPO3\CMS\Core\Package\Event\AfterPackageDeactivationEvent;
+use TYPO3\CMS\Core\Package\PackageManager;
+use TYPO3\CMS\Core\Registry;
 use TYPO3\CMS\Core\Service\OpcodeCacheService;
 use TYPO3\CMS\Core\SingletonInterface;
 use TYPO3\CMS\Core\Site\Entity\Site;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
+use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
 use TYPO3\CMS\Extensionmanager\Event\AfterExtensionDatabaseContentHasBeenImportedEvent;
 use TYPO3\CMS\Extensionmanager\Event\AfterExtensionFilesHaveBeenImportedEvent;
 use TYPO3\CMS\Extensionmanager\Event\AfterExtensionStaticDatabaseContentHasBeenImportedEvent;
@@ -96,7 +101,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility
      */
-    public function injectDependencyUtility(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility)
+    public function injectDependencyUtility(DependencyUtility $dependencyUtility)
     {
         $this->dependencyUtility = $dependencyUtility;
     }
@@ -104,7 +109,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility
      */
-    public function injectFileHandlingUtility(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility)
+    public function injectFileHandlingUtility(FileHandlingUtility $fileHandlingUtility)
     {
         $this->fileHandlingUtility = $fileHandlingUtility;
     }
@@ -112,7 +117,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility
      */
-    public function injectListUtility(\TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility)
+    public function injectListUtility(ListUtility $listUtility)
     {
         $this->listUtility = $listUtility;
     }
@@ -120,7 +125,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository
      */
-    public function injectExtensionRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository)
+    public function injectExtensionRepository(ExtensionRepository $extensionRepository)
     {
         $this->extensionRepository = $extensionRepository;
     }
@@ -128,7 +133,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Core\Package\PackageManager $packageManager
      */
-    public function injectPackageManager(\TYPO3\CMS\Core\Package\PackageManager $packageManager)
+    public function injectPackageManager(PackageManager $packageManager)
     {
         $this->packageManager = $packageManager;
     }
@@ -136,7 +141,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Core\Cache\CacheManager $cacheManager
      */
-    public function injectCacheManager(\TYPO3\CMS\Core\Cache\CacheManager $cacheManager)
+    public function injectCacheManager(CacheManager $cacheManager)
     {
         $this->cacheManager = $cacheManager;
     }
@@ -144,7 +149,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
     /**
      * @param \TYPO3\CMS\Core\Registry $registry
      */
-    public function injectRegistry(\TYPO3\CMS\Core\Registry $registry)
+    public function injectRegistry(Registry $registry)
     {
         $this->registry = $registry;
     }
@@ -205,7 +210,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
         $dependentExtensions = $this->dependencyUtility->findInstalledExtensionsThatDependOnMe($extensionKey);
         if (is_array($dependentExtensions) && !empty($dependentExtensions)) {
             throw new ExtensionManagerException(
-                \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(
+                LocalizationUtility::translate(
                     'extensionList.uninstall.dependencyError',
                     'extensionmanager',
                     [$extensionKey, implode(',', $dependentExtensions)]
index 3cf8b94..72aa225 100644 (file)
@@ -20,6 +20,7 @@ use TYPO3\CMS\Core\Core\Environment;
 use TYPO3\CMS\Core\Package\Event\PackagesMayHaveChangedEvent;
 use TYPO3\CMS\Core\Package\PackageInterface;
 use TYPO3\CMS\Core\Package\PackageManager;
+use TYPO3\CMS\Core\SingletonInterface;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
@@ -36,7 +37,7 @@ use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
  * - The name 'listUtility' is not good, the methods could be moved to some 'extensionInformationUtility', or a repository?
  * @internal This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
  */
-class ListUtility implements \TYPO3\CMS\Core\SingletonInterface
+class ListUtility implements SingletonInterface
 {
     /**
      * @var EmConfUtility
index c5f65d2..395aaf0 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Extensionmanager\Utility\Parser;
 
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
+
 /**
  * Parser for TYPO3's extension.xml file.
  *
@@ -50,10 +52,10 @@ class ExtensionXmlPullParser extends AbstractExtensionXmlParser
     {
         $this->createParser();
         if (!(is_object($this->objXml) && get_class($this->objXml) === \XMLReader::class)) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342640540);
+            throw new ExtensionManagerException('Unable to create XML parser.', 1342640540);
         }
         if ($this->objXml->open($file, 'utf-8') === false) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
+            throw new ExtensionManagerException(
                 sprintf('Unable to open file resource %s.', $file),
                 1476108651
             );
index c9eab4b..bc3d28a 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Extensionmanager\Utility\Parser;
 
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
+
 /**
  * Parser for TYPO3's extension.xml file.
  *
@@ -62,7 +64,7 @@ class ExtensionXmlPushParser extends AbstractExtensionXmlParser
     {
         $this->createParser();
         if (!is_resource($this->objXml)) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342640663);
+            throw new ExtensionManagerException('Unable to create XML parser.', 1342640663);
         }
         // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
         $previousValueOfEntityLoader = libxml_disable_entity_loader(true);
@@ -73,11 +75,11 @@ class ExtensionXmlPushParser extends AbstractExtensionXmlParser
         xml_set_element_handler($this->objXml, 'startElement', 'endElement');
         xml_set_character_data_handler($this->objXml, 'characterData');
         if (!($fp = fopen($file, 'r'))) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342640689);
+            throw new ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342640689);
         }
         while ($data = fread($fp, 4096)) {
             if (!xml_parse($this->objXml, $data, feof($fp))) {
-                throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('XML error %s in line %u of file resource %s.', xml_error_string(xml_get_error_code($this->objXml)), xml_get_current_line_number($this->objXml), $file), 1342640703);
+                throw new ExtensionManagerException(sprintf('XML error %s in line %u of file resource %s.', xml_error_string(xml_get_error_code($this->objXml)), xml_get_current_line_number($this->objXml), $file), 1342640703);
             }
         }
         libxml_disable_entity_loader($previousValueOfEntityLoader);
index 9d24a35..ddc71a3 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Extensionmanager\Utility\Parser;
 
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
+
 /**
  * Parser for TYPO3's mirrors.xml file.
  *
@@ -47,10 +49,10 @@ class MirrorXmlPullParser extends AbstractMirrorXmlParser
     {
         $this->createParser();
         if (!(is_object($this->objXml) && get_class($this->objXml) === \XMLReader::class)) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342640820);
+            throw new ExtensionManagerException('Unable to create XML parser.', 1342640820);
         }
         if ($this->objXml->open($file, 'utf-8') === false) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342640893);
+            throw new ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342640893);
         }
         while ($this->objXml->read()) {
             if ($this->objXml->nodeType == \XMLReader::ELEMENT) {
index 30e5cef..6cd5fdd 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Extensionmanager\Utility\Parser;
 
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
+
 /**
  * Parser for TYPO3's mirrors.xml file.
  *
@@ -60,7 +62,7 @@ class MirrorXmlPushParser extends AbstractMirrorXmlParser
     {
         $this->createParser();
         if (!is_resource($this->objXml)) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342641009);
+            throw new ExtensionManagerException('Unable to create XML parser.', 1342641009);
         }
         // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
         $previousValueOfEntityLoader = libxml_disable_entity_loader(true);
@@ -71,11 +73,11 @@ class MirrorXmlPushParser extends AbstractMirrorXmlParser
         xml_set_element_handler($this->objXml, 'startElement', 'endElement');
         xml_set_character_data_handler($this->objXml, 'characterData');
         if (!($fp = fopen($file, 'r'))) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342641010);
+            throw new ExtensionManagerException(sprintf('Unable to open file resource %s.', $file), 1342641010);
         }
         while ($data = fread($fp, 4096)) {
             if (!xml_parse($this->objXml, $data, feof($fp))) {
-                throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('XML error %s in line %u of file resource %s.', xml_error_string(xml_get_error_code($this->objXml)), xml_get_current_line_number($this->objXml), $file), 1342641011);
+                throw new ExtensionManagerException(sprintf('XML error %s in line %u of file resource %s.', xml_error_string(xml_get_error_code($this->objXml)), xml_get_current_line_number($this->objXml), $file), 1342641011);
             }
         }
         libxml_disable_entity_loader($previousValueOfEntityLoader);
index 76a3371..f5f452d 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Extensionmanager\Utility\Parser;
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Factory for XML parsers.
  * @internal This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
@@ -64,8 +66,8 @@ class XmlParserFactory
             // reset instance
             self::$instance[$parserType] = ($objParser = null);
             foreach (self::$parsers[$parserType] as $className => $file) {
-                if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($excludeClassNames, $className)) {
-                    $objParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className);
+                if (!GeneralUtility::inList($excludeClassNames, $className)) {
+                    $objParser = GeneralUtility::makeInstance($className);
                     if ($objParser->isAvailable()) {
                         self::$instance[$parserType] = &$objParser;
                         break;
index 0927bf4..008a892 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Extensionmanager\ViewHelpers\Be;
 
 use TYPO3\CMS\Extensionmanager\Controller\AbstractController;
+use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
 
 /**
  * Special ViewHelper for the BE module of the Extension Manager. Loads JS code for triggering
@@ -32,7 +33,7 @@ use TYPO3\CMS\Extensionmanager\Controller\AbstractController;
  *
  * @internal
  */
-class TriggerViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
+class TriggerViewHelper extends AbstractBackendViewHelper
 {
     /**
      * Initializes the arguments
index e16f992..85cf917 100644 (file)
@@ -18,14 +18,16 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
 use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
+use TYPO3\CMS\Extbase\Service\ExtensionService;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper;
 
 /**
  * ViewHelper
  * @internal
  */
-class DownloadExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper
+class DownloadExtensionViewHelper extends AbstractFormViewHelper
 {
     /**
      * @var string
@@ -40,7 +42,7 @@ class DownloadExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\Abst
     /**
      * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
      */
-    public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService)
+    public function injectExtensionService(ExtensionService $extensionService)
     {
         $this->extensionService = $extensionService;
     }
index 5094d5b..64f64b7 100644 (file)
@@ -17,8 +17,11 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
 
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
+use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\ActionViewHelper;
 
 /**
@@ -47,11 +50,11 @@ class RemoveExtensionViewHelper extends ActionViewHelper
     {
         $extension = $this->arguments['extension'];
         $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-        if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extension['key'])) {
+        if (ExtensionManagementUtility::isLoaded($extension['key'])) {
             return '<span class="btn btn-default disabled">' . $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
         }
         if (
-            !in_array($extension['type'], \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::returnAllowedInstallTypes()) ||
+            !in_array($extension['type'], Extension::returnAllowedInstallTypes()) ||
             $extension['type'] === 'System'
         ) {
             return '<span class="btn btn-default disabled">' . $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
@@ -67,7 +70,7 @@ class RemoveExtensionViewHelper extends ActionViewHelper
         $this->tag->addAttribute('href', $uri);
         $cssClass = 'removeExtension btn btn-default';
         $this->tag->addAttribute('class', $cssClass);
-        $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.remove', 'extensionmanager'));
+        $this->tag->addAttribute('title', LocalizationUtility::translate('extensionList.remove', 'extensionmanager'));
         $this->tag->setContent($iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render());
         return $this->tag->render();
     }
index a1af8cd..bceeadc 100644 (file)
@@ -20,6 +20,7 @@ use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Package\PackageManager;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\ActionViewHelper;
 
@@ -40,7 +41,7 @@ class ToggleExtensionInstallationStateViewHelper extends ActionViewHelper
     /**
      * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
      */
-    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
+    public function injectObjectManager(ObjectManagerInterface $objectManager)
     {
         $this->objectManager = $objectManager;
     }
index 751c6bf..e361859 100644 (file)
@@ -19,6 +19,9 @@ use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
+use TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\ActionViewHelper;
 
 /**
@@ -34,7 +37,7 @@ class UpdateScriptViewHelper extends ActionViewHelper
     /**
      * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
      */
-    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
+    public function injectObjectManager(ObjectManagerInterface $objectManager)
     {
         $this->objectManager = $objectManager;
     }
@@ -59,7 +62,7 @@ class UpdateScriptViewHelper extends ActionViewHelper
 
         // If the "class.ext_update.php" file exists, build link to the update script screen
         /** @var \TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility $updateScriptUtility */
-        $updateScriptUtility = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility::class);
+        $updateScriptUtility = $this->objectManager->get(UpdateScriptUtility::class);
         /** @var IconFactory $iconFactory */
         $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
         if ($updateScriptUtility->checkUpdateScriptExists($extensionKey)) {
@@ -72,7 +75,7 @@ class UpdateScriptViewHelper extends ActionViewHelper
                 'UpdateScript'
             );
             $this->tag->addAttribute('href', $uri);
-            $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.update.script', 'extensionmanager'));
+            $this->tag->addAttribute('title', LocalizationUtility::translate('extensionList.update.script', 'extensionmanager'));
             $this->tag->setContent($iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL)->render());
             $tag = $this->tag->render();
         } else {
index 7dc5dcc..c8da0de 100644 (file)
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Controller;
 
 use PHPUnit\Framework\MockObject\MockObject;
+use TYPO3\CMS\Extensionmanager\Controller\DownloadController;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
+use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
+use TYPO3\CMS\Extensionmanager\Utility\DownloadUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -30,18 +33,18 @@ class DownloadControllerTest extends UnitTestCase
     public function installFromTerReturnsArrayWithBooleanResultAndErrorArrayWhenExtensionManagerExceptionIsThrown(): void
     {
         $dummyExceptionMessage = 'exception message';
-        $dummyException = new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($dummyExceptionMessage, 1476108614);
+        $dummyException = new ExtensionManagerException($dummyExceptionMessage, 1476108614);
 
         $dummyExtensionName = 'dummy_extension';
         $dummyExtension = new Extension();
         $dummyExtension->setExtensionKey($dummyExtensionName);
 
         /** @var \TYPO3\CMS\Extensionmanager\Utility\DownloadUtility|MockObject $downloadUtilityMock */
-        $downloadUtilityMock = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Utility\DownloadUtility::class)->getMock();
+        $downloadUtilityMock = $this->getMockBuilder(DownloadUtility::class)->getMock();
         $downloadUtilityMock->expects(self::any())->method('setDownloadPath')->willThrowException($dummyException);
 
         /** @var \TYPO3\CMS\Extensionmanager\Controller\DownloadController $subject */
-        $subject = new \TYPO3\CMS\Extensionmanager\Controller\DownloadController();
+        $subject = new DownloadController();
         $subject->injectDownloadUtility($downloadUtilityMock);
 
         $reflectionClass = new \ReflectionClass($subject);
index 91a9e1e..9272217 100644 (file)
@@ -16,6 +16,9 @@
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Controller;
 
 use PHPUnit\Framework\MockObject\MockObject;
+use TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController;
+use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
+use TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -68,7 +71,7 @@ class UploadExtensionFileControllerTest extends UnitTestCase
     public function getExtensionFromZipFileExtractsExtensionKey($filename, $expectedKey)
     {
         /** @var \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService|MockObject $managementServiceMock */
-        $managementServiceMock = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class)
+        $managementServiceMock = $this->getMockBuilder(ExtensionManagementService::class)
             ->setMethods(['isAvailable'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -78,10 +81,10 @@ class UploadExtensionFileControllerTest extends UnitTestCase
             ->willReturn(false);
 
         /** @var \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility|MockObject $fileHandlingUtilityMock */
-        $fileHandlingUtilityMock = $this->createMock(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility::class);
+        $fileHandlingUtilityMock = $this->createMock(FileHandlingUtility::class);
         $fileHandlingUtilityMock->expects(self::once())->method('unzipExtensionFromFile');
 
-        $fixture = new \TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController();
+        $fixture = new UploadExtensionFileController();
         $fixture->injectManagementService($managementServiceMock);
         $fixture->injectFileHandlingUtility($fileHandlingUtilityMock);
 
index 57232b9..0a06de5 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Model;
 
+use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -85,7 +86,7 @@ class ExtensionTest extends UnitTestCase
      */
     public function getCategoryIndexFromStringOrNumberReturnsIndex($input, $expected)
     {
-        $extension = new \TYPO3\CMS\Extensionmanager\Domain\Model\Extension();
+        $extension = new Extension();
         self::assertEquals($expected, $extension->getCategoryIndexFromStringOrNumber($input));
     }
 }
index 506a0f4..278e227 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Repository;
 
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
+use TYPO3\CMS\Extensionmanager\Domain\Model\Repository;
+use TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -35,9 +38,9 @@ class RepositoryRepositoryTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->mockObjectManager = $this->getMockBuilder(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class)->getMock();
+        $this->mockObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
         /** @var $subject \TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository|\PHPUnit\Framework\MockObject\MockObject */
-        $this->subject = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class)
+        $this->subject = $this->getMockBuilder(RepositoryRepository::class)
             ->setMethods(['findAll'])
             ->setConstructorArgs([$this->mockObjectManager])
             ->getMock();
@@ -61,12 +64,12 @@ class RepositoryRepositoryTest extends UnitTestCase
      */
     public function findOneTypo3OrgRepositoryReturnsRepositoryWithCorrectTitle()
     {
-        $mockModelOne = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class)->getMock();
+        $mockModelOne = $this->getMockBuilder(Repository::class)->getMock();
         $mockModelOne
             ->expects(self::once())
             ->method('getTitle')
             ->willReturn('foo');
-        $mockModelTwo = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class)->getMock();
+        $mockModelTwo = $this->getMockBuilder(Repository::class)->getMock();
         $mockModelTwo
             ->expects(self::once())
             ->method('getTitle')
index 2f939ad..9f5ee2c 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Task;
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
 use TYPO3\CMS\Extensionmanager\Task\UpdateExtensionListTask;
 use TYPO3\CMS\Extensionmanager\Utility\Repository\Helper;
 use TYPO3\CMS\Scheduler\Task\AbstractTask;
@@ -49,20 +52,20 @@ class UpdateExtensionListTaskTest extends UnitTestCase
                 ->expects(self::once())
                 ->method('updateExtList');
 
-        $objectManagerMock = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $objectManagerMock = $this->createMock(ObjectManager::class);
         $objectManagerMock
                 ->expects(self::at(0))
                 ->method('get')
                 ->with(Helper::class)
                 ->willReturn($repositoryHelper);
 
-        $persistenceManagerMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class)->disableOriginalConstructor()->getMock();
+        $persistenceManagerMock = $this->getMockBuilder(PersistenceManager::class)->disableOriginalConstructor()->getMock();
         $objectManagerMock
                 ->expects(self::at(1))
                 ->method('get')
                 ->willReturn($persistenceManagerMock);
 
-        \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class, $objectManagerMock);
+        GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManagerMock);
 
         $task = $this->getMockBuilder(UpdateExtensionListTask::class)
             ->setMethods(['dummy'])
@@ -77,14 +80,14 @@ class UpdateExtensionListTaskTest extends UnitTestCase
     public function executeCallsPersistAllOnPersistenceManager()
     {
         $repositoryHelper = $this->createMock(Helper::class);
-        $objectManagerMock = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $objectManagerMock = $this->createMock(ObjectManager::class);
         $objectManagerMock
             ->expects(self::at(0))
             ->method('get')
             ->with(Helper::class)
             ->willReturn($repositoryHelper);
 
-        $persistenceManagerMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class)->disableOriginalConstructor()->getMock();
+        $persistenceManagerMock = $this->getMockBuilder(PersistenceManager::class)->disableOriginalConstructor()->getMock();
         $persistenceManagerMock
             ->expects(self::once())
             ->method('persistAll');
@@ -94,7 +97,7 @@ class UpdateExtensionListTaskTest extends UnitTestCase
                 ->method('get')
                 ->willReturn($persistenceManagerMock);
 
-        \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class, $objectManagerMock);
+        GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManagerMock);
 
         /** @var UpdateExtensionListTask|PHPUnit_Framework_MockObject_MockObject $task */
         $task = $this->getMockBuilder(UpdateExtensionListTask::class)
index 5ec2f98..7000af2 100644 (file)
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Utility;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Dependency;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Extension;
 use TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository;
 use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
+use TYPO3\CMS\Extensionmanager\Tests\Unit\Fixtures\LatestCompatibleExtensionObjectStorageFixture;
 use TYPO3\CMS\Extensionmanager\Utility\DependencyUtility;
+use TYPO3\CMS\Extensionmanager\Utility\EmConfUtility;
 use TYPO3\CMS\Extensionmanager\Utility\ListUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
@@ -40,7 +43,7 @@ class DependencyUtilityTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->objectManagerMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class)->getMock();
+        $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();
     }
 
     /**
@@ -353,7 +356,7 @@ class DependencyUtilityTest extends UnitTestCase
      */
     public function isAvailableVersionCompatibleCallsIsVersionCompatibleWithExtensionVersion(): void
     {
-        $emConfUtility = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Utility\EmConfUtility::class)
+        $emConfUtility = $this->getMockBuilder(EmConfUtility::class)
             ->setMethods(['includeEmConf'])
             ->getMock();
         $emConfUtility->expects(self::once())->method('includeEmConf')->willReturn([
@@ -483,7 +486,7 @@ class DependencyUtilityTest extends UnitTestCase
         $extension2->setExtensionKey('bar');
         $extension2->setVersion('1.0.42');
 
-        $myStorage = new \TYPO3\CMS\Extensionmanager\Tests\Unit\Fixtures\LatestCompatibleExtensionObjectStorageFixture();
+        $myStorage = new LatestCompatibleExtensionObjectStorageFixture();
         $myStorage->extensions[] = $extension1;
         $myStorage->extensions[] = $extension2;
         $dependency = new Dependency();
index cf4343a..db366a4 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Utility;
 
+use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extensionmanager\Domain\Model\Dependency;
 use TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
@@ -43,7 +44,7 @@ class ExtensionModelUtilityTest extends UnitTestCase
         ]);
         /** @var $dependencyUtility \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility */
         $dependencyUtility = new ExtensionModelUtility();
-        $objectManagerMock = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $objectManagerMock = $this->createMock(ObjectManager::class);
         $objectManagerMock->method('get')->willReturn(new Dependency());
         $dependencyUtility->injectObjectManager($objectManagerMock);
         $objectStorage = $dependencyUtility->convertDependenciesToObjects($serializedDependencies);
@@ -64,7 +65,7 @@ class ExtensionModelUtilityTest extends UnitTestCase
         ]);
 
         $dependencyUtility = new ExtensionModelUtility();
-        $objectManagerMock = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $objectManagerMock = $this->createMock(ObjectManager::class);
         // ensure we get a new dependency on subsequent calls
         $objectManagerMock->method('get')->willReturnCallback(
             static function () {
@@ -143,7 +144,7 @@ class ExtensionModelUtilityTest extends UnitTestCase
     {
         $serializedDependencies = serialize($dependencies);
         $dependencyUtility = new ExtensionModelUtility();
-        $objectManagerMock = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $objectManagerMock = $this->createMock(ObjectManager::class);
         // ensure we get a new dependency on subsequent calls
         $objectManagerMock->method('get')->willReturnCallback(
             static function () {
index f63a09b..9e2adc7 100644 (file)
@@ -26,6 +26,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
 use TYPO3\CMS\Core\Mail\MailMessage;
 use TYPO3\CMS\Core\Session\SessionManager;
 use TYPO3\CMS\Core\Site\SiteFinder;
+use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
 use TYPO3\CMS\Core\Utility\MailUtility;
@@ -216,7 +217,7 @@ class FrontendLoginController extends AbstractPlugin
                         GeneralUtility::callUserFunction($_funcRef, $_params, $ref);
                     }
                 }
-                \TYPO3\CMS\Core\Utility\HttpUtility::redirect($this->redirectUrl);
+                HttpUtility::redirect($this->redirectUrl);
             }
         }
         // Adds hook for processing of extra item markers / special
@@ -1041,7 +1042,7 @@ class FrontendLoginController extends AbstractPlugin
             $preserveQueryStringProperties = GeneralUtility::trimExplode(',', $this->conf['preserveGETvars']);
             $preserveQueryParts = [];
             parse_str(implode('=1&', $preserveQueryStringProperties) . '=1', $preserveQueryParts);
-            $preserveQueryParts = \TYPO3\CMS\Core\Utility\ArrayUtility::intersectRecursive($getVars, $preserveQueryParts);
+            $preserveQueryParts = ArrayUtility::intersectRecursive($getVars, $preserveQueryParts);
         }
         return $preserveQueryParts;
     }
index 113fde5..a662698 100644 (file)
@@ -17,13 +17,14 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Filelist\ContextMenu\ItemProviders;
 
+use TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Drag drop menu provider for legacy tree (used in filelist folder tree)
  * @internal this is a concrete TYPO3 hook implementation and solely used for EXT:filelist and not part of TYPO3's Core API.
  */
-class FileDragProvider extends \TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
+class FileDragProvider extends AbstractProvider
 {
     /**
      * @var array
index 5f2e1be..a17aec7 100644 (file)
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Filelist\ContextMenu\ItemProviders;
 
+use TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\Folder;
@@ -27,7 +28,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Provides click menu items for files and folders
  */
-class FileProvider extends \TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
+class FileProvider extends AbstractProvider
 {
     /**
      * @var File|Folder
index 3946390..145ea74 100644 (file)
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Filelist\Controller\File;
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Template\ModuleTemplate;
 use TYPO3\CMS\Core\Http\HtmlResponse;
 use TYPO3\CMS\Core\Imaging\Icon;
@@ -95,7 +96,7 @@ class FileUploadController
         $queryParams = $request->getQueryParams();
 
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         // Initialize GPvars:
         $this->target = $parsedBody['target'] ?? $queryParams['target'] ?? null;
         $this->returnUrl = GeneralUtility::sanitizeLocalUrl($parsedBody['returnUrl'] ?? $queryParams['returnUrl'] ?? '');
@@ -140,7 +141,7 @@ class FileUploadController
     {
         $lang = $this->getLanguageService();
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
 
         // set page title
         $this->moduleTemplate->setTitle($lang->sL('LLL:EXT:filelist/Resources/Private/Language/locallang.xlf:file_upload.php.pagetitle'));
index 8eda223..14bd753 100644 (file)
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Filelist\Controller\File;
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Template\Components\ButtonBar;
 use TYPO3\CMS\Backend\Template\ModuleTemplate;
 use TYPO3\CMS\Core\Http\HtmlResponse;
@@ -142,7 +143,7 @@ class RenameFileController
     {
         $assigns = [];
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $assigns['moduleUrlTceFile'] = (string)$uriBuilder->buildUriFromRoute('tce_file');
         $assigns['returnUrl'] = $this->returnUrl;
 
index 00aa380..d7c120f 100644 (file)
@@ -29,8 +29,11 @@ use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Resource\DuplicationBehavior;
 use TYPO3\CMS\Core\Resource\Exception;
+use TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException;
+use TYPO3\CMS\Core\Resource\FileRepository;
 use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
+use TYPO3\CMS\Core\Resource\ResourceStorage;
 use TYPO3\CMS\Core\Resource\Search\FileSearchDemand;
 use TYPO3\CMS\Core\Resource\Utility\ListUtility;
 use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation;
@@ -144,7 +147,7 @@ class FileListController extends ActionController implements LoggerAwareInterfac
     /**
      * @param \TYPO3\CMS\Core\Resource\FileRepository $fileRepository
      */
-    public function injectFileRepository(\TYPO3\CMS\Core\Resource\FileRepository $fileRepository)
+    public function injectFileRepository(FileRepository $fileRepository)
     {
         $this->fileRepository = $fileRepository;
     }
@@ -180,7 +183,7 @@ class FileListController extends ActionController implements LoggerAwareInterfac
                 $this->folderObject = $resourceFactory->getFolderObjectFromCombinedIdentifier($storage->getUid() . ':' . $identifier);
                 // Disallow access to fallback storage 0
                 if ($storage->getUid() === 0) {
-                    throw new Exception\InsufficientFolderAccessPermissionsException(
+                    throw new InsufficientFolderAccessPermissionsException(
                         'You are not allowed to access files outside your storages',
                         1434539815
                     );
@@ -203,7 +206,7 @@ class FileListController extends ActionController implements LoggerAwareInterfac
             if ($this->folderObject && !$this->folderObject->getStorage()->isWithinFileMountBoundaries($this->folderObject)) {
                 throw new \RuntimeException('Folder not accessible.', 1430409089);
             }
-        } catch (Exception\InsufficientFolderAccessPermissionsException $permissionException) {
+        } catch (InsufficientFolderAccessPermissionsException $permissionException) {
             $this->folderObject = null;
             $this->errorMessage = GeneralUtility::makeInstance(
                 FlashMessage::class,
@@ -220,7 +223,7 @@ class FileListController extends ActionController implements LoggerAwareInterfac
             // Take the first object of the first storage
             $fileStorages = $this->getBackendUser()->getFileStorages();
             $fileStorage = reset($fileStorages);
-            if ($fileStorage instanceof \TYPO3\CMS\Core\Resource\ResourceStorage) {
+            if ($fileStorage instanceof ResourceStorage) {
                 $this->folderObject = $fileStorage->getRootLevelFolder();
                 if (!$fileStorage->isWithinFileMountBoundaries($this->folderObject)) {
                     $this->folderObject = null;
index ff944de..3cff5c1 100644 (file)
 
 namespace TYPO3\CMS\Filelist;
 
+use TYPO3\CMS\Backend\Tree\View\FolderTreeView;
+
 /**
  * Class for drag and drop and ajax functionality
  * @see class \TYPO3\CMS\Backend\Tree\View\BrowseTreeView
  * @internal this is a concrete TYPO3 tree implementation and solely used for EXT:filelist and not part of TYPO3's Core API.
  */
-class FileListFolderTree extends \TYPO3\CMS\Backend\Tree\View\FolderTreeView
+class FileListFolderTree extends FolderTreeView
 {
     /**
      * @var bool
index c9d6f92..809b24d 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Filelist\Hook;
 
 use TYPO3\CMS\Backend\Controller\BackendController;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -35,7 +36,7 @@ class BackendControllerHook
     {
         $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $pageRenderer->addInlineSetting('FileRename', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_rename'));
         $pageRenderer->addInlineSetting('FileEdit', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_edit'));
         $pageRenderer->addInlineSetting('FileUpload', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_upload'));
index 6003cae..6c3e483 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Filelist\ViewHelpers\Uri;
 
 use Closure;
 use TYPO3\CMS\Backend\Clipboard\Clipboard;
+use TYPO3\CMS\Core\Resource\AbstractFile;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
@@ -34,7 +35,7 @@ class CopyCutFileViewHelper extends AbstractViewHelper
      */
     public function initializeArguments()
     {
-        $this->registerArgument('file', \TYPO3\CMS\Core\Resource\AbstractFile::class, '', true);
+        $this->registerArgument('file', AbstractFile::class, '', true);
         $this->registerArgument('copyOrCut', 'string', '', false, 'copy');
     }
 
index 47e60c1..7d43f02 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Filelist\ViewHelpers\Uri;
 
 use Closure;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
+use TYPO3\CMS\Core\Resource\AbstractFile;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
@@ -34,7 +35,7 @@ class EditFileContentViewHelper extends AbstractViewHelper
      */
     public function initializeArguments()
     {
-        $this->registerArgument('file', \TYPO3\CMS\Core\Resource\AbstractFile::class, '', true);
+        $this->registerArgument('file', AbstractFile::class, '', true);
         $this->registerArgument('returnUrl', 'string', '', false, '');
     }
 
index 971a692..01d1bd0 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Filelist\ViewHelpers\Uri;
 
 use TYPO3\CMS\Backend\Routing\UriBuilder;
+use TYPO3\CMS\Core\Resource\AbstractFile;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
@@ -33,7 +34,7 @@ class RenameFileViewHelper extends AbstractViewHelper
      */
     public function initializeArguments()
     {
-        $this->registerArgument('file', \TYPO3\CMS\Core\Resource\AbstractFile::class, '', true);
+        $this->registerArgument('file', AbstractFile::class, '', true);
         $this->registerArgument('returnUrl', 'string', '', false, '');
     }
 
index 1da4c08..d7dc83c 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Filelist\ViewHelpers\Uri;
 
 use TYPO3\CMS\Backend\Routing\UriBuilder;
+use TYPO3\CMS\Core\Resource\AbstractFile;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
@@ -33,7 +34,7 @@ class ReplaceFileViewHelper extends AbstractViewHelper
      */
     public function initializeArguments()
     {
-        $this->registerArgument('file', \TYPO3\CMS\Core\Resource\AbstractFile::class, '', true);
+        $this->registerArgument('file', AbstractFile::class, '', true);
         $this->registerArgument('returnUrl', 'string', '', false, '');
     }
 
index 6552957..f16b59a 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Fluid\Core\Rendering;
 
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Fluid\Core\Cache\FluidTemplateCache;
 use TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver;
@@ -55,7 +56,7 @@ class RenderingContext extends \TYPO3Fluid\Fluid\Core\Rendering\RenderingContext
     /**
      * @param \TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer $viewHelperVariableContainer
      */
-    public function injectViewHelperVariableContainer(\TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer $viewHelperVariableContainer)
+    public function injectViewHelperVariableContainer(ViewHelperVariableContainer $viewHelperVariableContainer)
     {
         $this->viewHelperVariableContainer = $viewHelperVariableContainer;
     }
@@ -195,7 +196,7 @@ class RenderingContext extends \TYPO3Fluid\Fluid\Core\Rendering\RenderingContext
      *
      * @param \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext The controller context to set
      */
-    public function setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
+    public function setControllerContext(ControllerContext $controllerContext)
     {
         $request = $controllerContext->getRequest();
         $this->controllerContext = $controllerContext;
index 0af1e1b..97f31b3 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3\CMS\Core\SingletonInterface;
+use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
+use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
+use TYPO3\CMS\Extbase\Mvc\RequestInterface;
+use TYPO3\CMS\Extbase\Mvc\ResponseInterface;
+use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
 use TYPO3\CMS\Fluid\View\TemplatePaths;
 
 /**
@@ -22,12 +28,12 @@ use TYPO3\CMS\Fluid\View\TemplatePaths;
  * It is basically an ActionController and additionally has $this->widgetConfiguration set to the
  * Configuration of the current Widget.
  */
-abstract class AbstractWidgetController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController implements \TYPO3\CMS\Core\SingletonInterface
+abstract class AbstractWidgetController extends ActionController implements SingletonInterface
 {
     /**
      * @var array
      */
-    protected $supportedRequestTypes = [\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class];
+    protected $supportedRequestTypes = [WidgetRequest::class];
 
     /**
      * Configuration for this widget.
@@ -42,7 +48,7 @@ abstract class AbstractWidgetController extends \TYPO3\CMS\Extbase\Mvc\Controlle
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
      * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, modified by this handler
      */
-    public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
+    public function processRequest(RequestInterface $request, ResponseInterface $response)
     {
         $this->widgetConfiguration = $request->getWidgetContext()->getWidgetConfiguration();
         parent::processRequest($request, $response);
@@ -54,9 +60,9 @@ abstract class AbstractWidgetController extends \TYPO3\CMS\Extbase\Mvc\Controlle
      *
      * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
      */
-    protected function setViewConfiguration(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
+    protected function setViewConfiguration(ViewInterface $view)
     {
-        $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
+        $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         $widgetViewHelperClassName = $this->request->getWidgetContext()->getWidgetViewHelperClassName();
         $templatePaths = new TemplatePaths($this->controllerContext->getRequest()->getControllerExtensionKey());
         $parentConfiguration = $view->getTemplatePaths()->toArray();
index 38c6156..9ac001a 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3\CMS\Extbase\Mvc\Web\Response;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
+use TYPO3\CMS\Extbase\Service\ExtensionService;
+use TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException;
 use TYPO3Fluid\Fluid\Component\ComponentInterface;
 use TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler;
+use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode;
 use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
@@ -67,7 +72,7 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
      * @param \TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder
      * @internal
      */
-    public function injectAjaxWidgetContextHolder(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder)
+    public function injectAjaxWidgetContextHolder(AjaxWidgetContextHolder $ajaxWidgetContextHolder)
     {
         $this->ajaxWidgetContextHolder = $ajaxWidgetContextHolder;
     }
@@ -76,17 +81,17 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
      * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
      * @internal
      */
-    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
+    public function injectObjectManager(ObjectManagerInterface $objectManager)
     {
         $this->objectManager = $objectManager;
-        $this->widgetContext = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
+        $this->widgetContext = $this->objectManager->get(WidgetContext::class);
     }
 
     /**
      * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
      * @internal
      */
-    public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService)
+    public function injectExtensionService(ExtensionService $extensionService)
     {
         $this->extensionService = $extensionService;
     }
@@ -153,7 +158,7 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
     public function onClose(RenderingContextInterface $renderingContext): ComponentInterface
     {
         $node = parent::onClose($renderingContext);
-        $rootNode = $this->objectManager->get(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode::class);
+        $rootNode = $this->objectManager->get(RootNode::class);
         $rootNode->setChildren($this->getChildren());
         $this->widgetContext->setViewHelperChildNodes($rootNode, $renderingContext);
         return $node;
@@ -188,7 +193,7 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
      */
     public function setChildNodes(array $childNodes)
     {
-        $rootNode = $this->objectManager->get(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode::class);
+        $rootNode = $this->objectManager->get(RootNode::class);
         foreach ($childNodes as $childNode) {
             $rootNode->addChildNode($childNode);
         }
@@ -214,19 +219,19 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
      */
     protected function initiateSubRequest()
     {
-        if (!isset($this->controller) || !$this->controller instanceof \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController) {
-            throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException(
+        if (!isset($this->controller) || !$this->controller instanceof AbstractWidgetController) {
+            throw new MissingControllerException(
                 'initiateSubRequest() can not be called if there is no valid controller extending ' .
-                \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class .
+                AbstractWidgetController::class .
                 ' Got "' . ($this->controller ? get_class($this->controller) : gettype($this->controller)) .
                 '" in class "' . static::class . '".',
                 1289422564
             );
         }
-        $subRequest = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class);
+        $subRequest = $this->objectManager->get(WidgetRequest::class);
         $subRequest->setWidgetContext($this->widgetContext);
         $this->passArgumentsToSubRequest($subRequest);
-        $subResponse = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class);
+        $subResponse = $this->objectManager->get(Response::class);
         $this->controller->processRequest($subRequest, $subResponse);
         return $subResponse;
     }
@@ -236,7 +241,7 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
      *
      * @param \TYPO3\CMS\Fluid\Core\Widget\WidgetRequest $subRequest
      */
-    private function passArgumentsToSubRequest(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest $subRequest)
+    private function passArgumentsToSubRequest(WidgetRequest $subRequest)
     {
         $arguments = $this->renderingContext->getControllerContext()->getRequest()->getArguments();
         $widgetIdentifier = $this->widgetContext->getWidgetIdentifier();
index 5997986..7ec47ce 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3\CMS\Core\SingletonInterface;
+use TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetContextNotFoundException;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 
 /**
@@ -24,7 +26,7 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
  *
  * @internal This class is only used internally by the widget framework.
  */
-class AjaxWidgetContextHolder implements \TYPO3\CMS\Core\SingletonInterface
+class AjaxWidgetContextHolder implements SingletonInterface
 {
     /**
      * An array $ajaxWidgetIdentifier => $widgetContext
@@ -69,7 +71,7 @@ class AjaxWidgetContextHolder implements \TYPO3\CMS\Core\SingletonInterface
     public function get($ajaxWidgetId)
     {
         if (!isset($this->widgetContexts[$ajaxWidgetId])) {
-            throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetContextNotFoundException('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId . '". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775);
+            throw new WidgetContextNotFoundException('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId . '". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775);
         }
         return $this->widgetContexts[$ajaxWidgetId];
     }
@@ -80,7 +82,7 @@ class AjaxWidgetContextHolder implements \TYPO3\CMS\Core\SingletonInterface
      *
      * @param \TYPO3\CMS\Fluid\Core\Widget\WidgetContext $widgetContext
      */
-    public function store(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext $widgetContext)
+    public function store(WidgetContext $widgetContext)
     {
         $ajaxWidgetId = md5(uniqid(random_int(0, mt_getrandmax()), true));
         $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId);
index d30d233..edb1401 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+
 /**
  * This is the bootstrap for Ajax Widget responses
  *
@@ -47,10 +52,10 @@ class Bootstrap
      */
     public function run($content, $configuration)
     {
-        $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
         $this->initializeConfiguration($configuration);
-        $ajaxWidgetContextHolder = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::class);
-        $widgetIdentifier = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('fluid-widget-id');
+        $ajaxWidgetContextHolder = $this->objectManager->get(AjaxWidgetContextHolder::class);
+        $widgetIdentifier = GeneralUtility::_GET('fluid-widget-id');
         $widgetContext = $ajaxWidgetContextHolder->get($widgetIdentifier);
         $configuration['extensionName'] = $widgetContext->getParentExtensionName();
         $configuration['pluginName'] = $widgetContext->getParentPluginName();
@@ -67,9 +72,9 @@ class Bootstrap
      */
     public function initializeConfiguration($configuration)
     {
-        $this->configurationManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
+        $this->configurationManager = $this->objectManager->get(ConfigurationManagerInterface::class);
         /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject */
-        $contentObject = $this->cObj ?? \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        $contentObject = $this->cObj ?? GeneralUtility::makeInstance(ContentObjectRenderer::class);
         $this->configurationManager->setContentObject($contentObject);
         $this->configurationManager->setConfiguration($configuration);
     }
index b0a3f31..5ac13a8 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget\Exception;
 
+use TYPO3\CMS\Fluid\Core\Widget\Exception;
+
 /**
  * An exception if the controller is missing.
  *
  * @internal
  */
-class MissingControllerException extends \TYPO3\CMS\Fluid\Core\Widget\Exception
+class MissingControllerException extends Exception
 {
 }
index cfc1775..ace21e0 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget\Exception;
 
+use TYPO3\CMS\Fluid\Core\Widget\Exception;
+
 /**
  * An exception if no widget context could be found inside the AjaxWidgetContextHolder.
  *
  * @internal
  */
-class RenderingContextNotFoundException extends \TYPO3\CMS\Fluid\Core\Widget\Exception
+class RenderingContextNotFoundException extends Exception
 {
 }
index f3f154a..178f017 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget\Exception;
 
+use TYPO3\CMS\Fluid\Core\Widget\Exception;
+
 /**
  * An exception if no widget context could be found inside the AjaxWidgetContextHolder.
  *
  * @internal
  */
-class WidgetContextNotFoundException extends \TYPO3\CMS\Fluid\Core\Widget\Exception
+class WidgetContextNotFoundException extends Exception
 {
 }
index 1e7942d..dd467b3 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget\Exception;
 
+use TYPO3\CMS\Fluid\Core\Widget\Exception;
+
 /**
  * An exception if no widget Request could be found inside <f:renderChildren>.
  *
  * @internal
  */
-class WidgetRequestNotFoundException extends \TYPO3\CMS\Fluid\Core\Widget\Exception
+class WidgetRequestNotFoundException extends Exception
 {
 }
index 121f365..0049f86 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode;
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+
 /**
  * The WidgetContext stores all information a widget needs to know about the
  * environment.
@@ -242,7 +245,7 @@ class WidgetContext
      * @param \TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes
      * @param \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $viewHelperChildNodeRenderingContext
      */
-    public function setViewHelperChildNodes(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes, \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $viewHelperChildNodeRenderingContext)
+    public function setViewHelperChildNodes(RootNode $viewHelperChildNodes, RenderingContextInterface $viewHelperChildNodeRenderingContext)
     {
         $this->viewHelperChildNodes = $viewHelperChildNodes;
         $this->viewHelperChildNodeRenderingContext = $viewHelperChildNodeRenderingContext;
index fbb28f1..008b34b 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3\CMS\Extbase\Mvc\Request;
+
 /**
  * Represents a widget request.
  * @internal It is a purely internal class which should not be used outside of Fluid.
  */
-class WidgetRequest extends \TYPO3\CMS\Extbase\Mvc\Request
+class WidgetRequest extends Request
 {
     /**
      * @var string The requested representation format
@@ -42,7 +44,7 @@ class WidgetRequest extends \TYPO3\CMS\Extbase\Mvc\Request
     /**
      * @param \TYPO3\CMS\Fluid\Core\Widget\WidgetContext $widgetContext
      */
-    public function setWidgetContext(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext $widgetContext)
+    public function setWidgetContext(WidgetContext $widgetContext)
     {
         $this->widgetContext = $widgetContext;
         $this->setControllerObjectName($widgetContext->getControllerObjectName());
index d306d2f..df84f96 100644 (file)
@@ -46,7 +46,7 @@ class WidgetRequestBuilder extends RequestBuilder
      */
     public function build(): RequestInterface
     {
-        $baseUri = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
+        $baseUri = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
         if ($this->environmentService->isEnvironmentInBackendMode()) {
             $baseUri .= TYPO3_mainDir;
         }
index ba7f755..ca0e499 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Core\Widget;
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
+use TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHandler;
+use TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder;
+use TYPO3\CMS\Extbase\Mvc\Web\Response;
+
 /**
  * Widget request handler, which handles the request if
  * f3-fluid-widget-id is found.
@@ -22,7 +28,7 @@ namespace TYPO3\CMS\Fluid\Core\Widget;
  * This Request Handler gets the WidgetRequestBuilder injected.
  * @internal It is a purely internal class which should not be used outside of Fluid.
  */
-class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHandler
+class WidgetRequestHandler extends AbstractRequestHandler
 {
     /**
      * @var \TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder
@@ -42,7 +48,7 @@ class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHan
     /**
      * @param \TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder
      */
-    public function injectAjaxWidgetContextHolder(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder)
+    public function injectAjaxWidgetContextHolder(AjaxWidgetContextHolder $ajaxWidgetContextHolder)
     {
         $this->ajaxWidgetContextHolder = $ajaxWidgetContextHolder;
     }
@@ -50,7 +56,7 @@ class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHan
     /**
      * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
      */
-    public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
+    public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
     {
         $this->configurationManager = $configurationManager;
     }
@@ -58,7 +64,7 @@ class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHan
     /**
      * @param \TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder $requestBuilder
      */
-    public function injectRequestBuilder(\TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder $requestBuilder)
+    public function injectRequestBuilder(RequestBuilder $requestBuilder)
     {
         // This method intentionally left blank
     }
@@ -66,7 +72,7 @@ class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHan
     /**
      * @param \TYPO3\CMS\Fluid\Core\Widget\WidgetRequestBuilder $requestBuilder
      */
-    public function injectWidgetRequestBuilder(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequestBuilder $requestBuilder)
+    public function injectWidgetRequestBuilder(WidgetRequestBuilder $requestBuilder)
     {
         $this->requestBuilder = $requestBuilder;
     }
@@ -79,7 +85,7 @@ class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHan
     public function handleRequest()
     {
         $request = $this->requestBuilder->build();
-        $response = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Response::class);
+        $response = $this->objectManager->get(Response::class);
         $this->dispatcher->dispatch($request, $response);
         return $response;
     }
@@ -89,7 +95,7 @@ class WidgetRequestHandler extends \TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHan
      */
     public function canHandleRequest()
     {
-        $rawGetArguments = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET();
+        $rawGetArguments = GeneralUtility::_GET();
         return isset($rawGetArguments['fluid-widget-id']);
     }
 
index 769b56f..b830ee0 100644 (file)
@@ -16,6 +16,8 @@
 namespace TYPO3\CMS\Fluid\View;
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
+use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
@@ -27,7 +29,7 @@ use TYPO3Fluid\Fluid\View\TemplateView;
  *
  * Contains the fundamental methods which any Fluid based template view needs.
  */
-abstract class AbstractTemplateView extends TemplateView implements \TYPO3\CMS\Extbase\Mvc\View\ViewInterface
+abstract class AbstractTemplateView extends TemplateView implements ViewInterface
 {
     /**
      * @var \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
@@ -62,7 +64,7 @@ abstract class AbstractTemplateView extends TemplateView implements \TYPO3\CMS\E
      * @param \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext Controller context which is available inside the view
      * @return bool TRUE if the view has something useful to display, otherwise FALSE
      */
-    public function canRender(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
+    public function canRender(ControllerContext $controllerContext)
     {
         return true;
     }
@@ -73,7 +75,7 @@ abstract class AbstractTemplateView extends TemplateView implements \TYPO3\CMS\E
      * @param \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext
      * @internal
      */
-    public function setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
+    public function setControllerContext(ControllerContext $controllerContext)
     {
         $request = $controllerContext->getRequest();
         $this->controllerContext = $controllerContext;
index e106699..b370b61 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Fluid\View;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
+use TYPO3\CMS\Extbase\Mvc\Web\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Service\EnvironmentService;
@@ -55,13 +56,13 @@ class StandaloneView extends AbstractTemplateView
         }
         $configurationManager->setContentObject($contentObject);
 
-        $baseUri = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
+        $baseUri = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
         if ($this->objectManager->get(EnvironmentService::class)->isEnvironmentInBackendMode()) {
             $baseUri .= TYPO3_mainDir;
         }
 
         /** @var \TYPO3\CMS\Extbase\Mvc\Web\Request $request */
-        $request = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
+        $request = $this->objectManager->get(Request::class);
         $request->setRequestUri(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
         $request->setBaseUri($baseUri);
         /** @var UriBuilder $uriBuilder */
index d0867f9..a889b62 100644 (file)
@@ -18,6 +18,8 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Be;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
+use TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList;
 
 /**
  * ViewHelper which renders a record list as known from the TYPO3 list module.
@@ -56,7 +58,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * List of "Website user" records with a text property of ``foo`` stored on PID ``1`` and two levels down.
  * Clicking on a username will open the TYPO3 info popup for the respective record
  */
-class TableListViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
+class TableListViewHelper extends AbstractBackendViewHelper
 {
     /**
      * As this ViewHelper renders HTML, the output must not be escaped.
@@ -73,7 +75,7 @@ class TableListViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBacken
     /**
      * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
      */
-    public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
+    public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
     {
         $this->configurationManager = $configurationManager;
     }
@@ -124,7 +126,7 @@ class TableListViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBacken
 
         $pageinfo = BackendUtility::readPageAccess(GeneralUtility::_GP('id'), $GLOBALS['BE_USER']->getPagePermsClause(Permission::PAGE_SHOW));
         /** @var \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList $dblist */
-        $dblist = GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::class);
+        $dblist = GeneralUtility::makeInstance(DatabaseRecordList::class);
         $dblist->pageRow = $pageinfo;
         if ($readOnly === false) {
             $dblist->calcPerms = $GLOBALS['BE_USER']->calcPerms($pageinfo);
@@ -134,7 +136,7 @@ class TableListViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBacken
         $dblist->clickTitleMode = $clickTitleMode;
         $dblist->clickMenuEnabled = $enableClickMenu;
         if ($storagePid === null) {
-            $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
+            $frameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
             $storagePid = $frameworkConfiguration['persistence']['storagePid'];
         }
         $dblist->start($storagePid, $tableName, (int)GeneralUtility::_GP('pointer'), $filter, $levels, $recordsPerPage);
index e34721c..c3f2ee7 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Be\Widget\Controller;
 
+use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController;
+
 /**
  * Class PaginateController
  */
-class PaginateController extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController
+class PaginateController extends AbstractWidgetController
 {
     /**
      * @var array
@@ -61,7 +64,7 @@ class PaginateController extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetCont
     public function initializeAction()
     {
         $this->objects = $this->widgetConfiguration['objects'];
-        \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($this->configuration, $this->widgetConfiguration['configuration'], false);
+        ArrayUtility::mergeRecursiveWithOverrule($this->configuration, $this->widgetConfiguration['configuration'], false);
         $this->numberOfObjects = count($this->objects);
         $itemsPerPage = (int)$this->configuration['itemsPerPage'];
         $this->numberOfPages = $itemsPerPage > 0 ? ceil($this->numberOfObjects / $itemsPerPage) : 0;
index be90299..bbb38d6 100644 (file)
@@ -16,6 +16,8 @@
 namespace TYPO3\CMS\Fluid\ViewHelpers\Be\Widget;
 
 use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
+use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper;
+use TYPO3\CMS\Fluid\ViewHelpers\Be\Widget\Controller\PaginateController;
 
 /**
  * This ViewHelper renders a Pagination of objects for the TYPO3 Backend.
@@ -49,7 +51,7 @@ use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
  * only the small subset of objects.
  * So, there is no negative performance overhead in using the Be Paginate Widget.
  */
-class PaginateViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
+class PaginateViewHelper extends AbstractWidgetViewHelper
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Be\Widget\Controller\PaginateController
@@ -59,7 +61,7 @@ class PaginateViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetView
     /**
      * @param \TYPO3\CMS\Fluid\ViewHelpers\Be\Widget\Controller\PaginateController $controller
      */
-    public function injectPaginateController(\TYPO3\CMS\Fluid\ViewHelpers\Be\Widget\Controller\PaginateController $controller)
+    public function injectPaginateController(PaginateController $controller)
     {
         $this->controller = $controller;
     }
index 66eaebe..b286ee2 100644 (file)
@@ -20,10 +20,12 @@ use TYPO3\CMS\Core\TimeTracker\TimeTracker;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
 use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderStatic;
 
 /**
@@ -136,7 +138,7 @@ class CObjectViewHelper extends AbstractViewHelper
         }
         $currentValue = null;
         if (is_object($data)) {
-            $data = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getGettableProperties($data);
+            $data = ObjectAccess::getGettableProperties($data);
         } elseif (is_string($data) || is_numeric($data)) {
             $currentValue = (string)$data;
             $data = [$data];
@@ -152,7 +154,7 @@ class CObjectViewHelper extends AbstractViewHelper
         $setup = static::getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
         foreach ($pathSegments as $segment) {
             if (!array_key_exists($segment . '.', $setup)) {
-                throw new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception(
+                throw new Exception(
                     'TypoScript object path "' . $typoscriptObjectPath . '" does not exist',
                     1253191023
                 );
@@ -160,7 +162,7 @@ class CObjectViewHelper extends AbstractViewHelper
             $setup = $setup[$segment . '.'];
         }
         if (!isset($setup[$lastSegment])) {
-            throw new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception(
+            throw new Exception(
                 'No Content Object definition found at TypoScript object path "' . $typoscriptObjectPath . '"',
                 1540246570
             );
index d318b2c..ab32038 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
 
+use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
+use TYPO3\CMS\Extbase\Error\Result;
 use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
+use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper;
 
 /**
  * Abstract Form ViewHelper. Bundles functionality related to direct property access of objects in other Form ViewHelpers.
@@ -38,7 +41,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
     /**
      * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
      */
-    public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
+    public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
     {
         $this->configurationManager = $configurationManager;
     }
@@ -111,7 +114,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
     {
         if ($this->isObjectAccessorMode()) {
             $formObjectName = $this->renderingContext->getViewHelperVariableContainer()->get(
-                \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+                FormViewHelper::class,
                 'formObjectName'
             );
             if (!empty($formObjectName)) {
@@ -247,7 +250,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
 
         $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
         if (!$viewHelperVariableContainer->exists(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObject'
         )
         ) {
@@ -259,11 +262,11 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
             return;
         }
         $formObject = $viewHelperVariableContainer->get(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObject'
         );
         $objectName = $viewHelperVariableContainer->get(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObjectName'
         );
         // If count == 2 -> we need to go through the for-loop exactly once
@@ -274,12 +277,12 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
             $hiddenIdentityField = $this->renderHiddenIdentityField($object, $objectName);
             // Add the hidden identity field to the ViewHelperVariableContainer
             $additionalIdentityProperties = $viewHelperVariableContainer->get(
-                \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+                FormViewHelper::class,
                 'additionalIdentityProperties'
             );
             $additionalIdentityProperties[$objectName] = $hiddenIdentityField;
             $viewHelperVariableContainer->addOrUpdate(
-                \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+                FormViewHelper::class,
                 'additionalIdentityProperties',
                 $additionalIdentityProperties
             );
@@ -295,14 +298,14 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
     {
         $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
         if (!$viewHelperVariableContainer->exists(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObject'
         )
         ) {
             return null;
         }
         $formObject = $viewHelperVariableContainer->get(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObject'
         );
         return ObjectAccess::getPropertyPath($formObject, $this->arguments['property']);
@@ -316,7 +319,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
     protected function isObjectAccessorMode()
     {
         return $this->hasArgument('property') && $this->renderingContext->getViewHelperVariableContainer()->exists(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObjectName'
         );
     }
@@ -351,11 +354,11 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
     protected function getMappingResultsForProperty()
     {
         if (!$this->isObjectAccessorMode()) {
-            return new \TYPO3\CMS\Extbase\Error\Result();
+            return new Result();
         }
         $originalRequestMappingResults = $this->getRequest()->getOriginalRequestMappingResults();
         $formObjectName = $this->renderingContext->getViewHelperVariableContainer()->get(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'formObjectName'
         );
         return $originalRequestMappingResults->forProperty($formObjectName)->forProperty($this->arguments['property']);
@@ -372,12 +375,12 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
         $hiddenFieldNames = [];
         $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
         if ($viewHelperVariableContainer->exists(
-            \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+            FormViewHelper::class,
             'renderedHiddenFields'
         )
         ) {
             $hiddenFieldNames = $viewHelperVariableContainer->get(
-                \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+                FormViewHelper::class,
                 'renderedHiddenFields'
             );
         }
@@ -388,7 +391,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
         if (!in_array($fieldName, $hiddenFieldNames)) {
             $hiddenFieldNames[] = $fieldName;
             $viewHelperVariableContainer->addOrUpdate(
-                \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class,
+                FormViewHelper::class,
                 'renderedHiddenFields',
                 $hiddenFieldNames
             );
index 5bf09c1..d080261 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
 
+use TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject;
+use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
+use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
+use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
 
 /**
@@ -33,7 +37,7 @@ abstract class AbstractFormViewHelper extends AbstractTagBasedViewHelper
     /**
      * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager
      */
-    public function injectPersistenceManager(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager)
+    public function injectPersistenceManager(PersistenceManagerInterface $persistenceManager)
     {
         $this->persistenceManager = $persistenceManager;
     }
@@ -50,10 +54,10 @@ abstract class AbstractFormViewHelper extends AbstractTagBasedViewHelper
             return '';
         }
         $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
-        if (!$viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')) {
+        if (!$viewHelperVariableContainer->exists(FormViewHelper::class, 'fieldNamePrefix')) {
             return $fieldName;
         }
-        $fieldNamePrefix = (string)$viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix');
+        $fieldNamePrefix = (string)$viewHelperVariableContainer->get(FormViewHelper::class, 'fieldNamePrefix');
         if ($fieldNamePrefix === '') {
             return $fieldName;
         }
@@ -75,11 +79,11 @@ abstract class AbstractFormViewHelper extends AbstractTagBasedViewHelper
      */
     protected function renderHiddenIdentityField($object, $name)
     {
-        if ($object instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
+        if ($object instanceof LazyLoadingProxy) {
             $object = $object->_loadRealInstance();
         }
         if (!is_object($object)
-            || !($object instanceof \TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject)
+            || !($object instanceof AbstractDomainObject)
             || ($object->_isNew() && !$object->_isClone())) {
             return '';
         }
@@ -103,12 +107,12 @@ abstract class AbstractFormViewHelper extends AbstractTagBasedViewHelper
     protected function registerFieldNameForFormTokenGeneration($fieldName)
     {
         $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
-        if ($viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames')) {
-            $formFieldNames = $viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames');
+        if ($viewHelperVariableContainer->exists(FormViewHelper::class, 'formFieldNames')) {
+            $formFieldNames = $viewHelperVariableContainer->get(FormViewHelper::class, 'formFieldNames');
         } else {
             $formFieldNames = [];
         }
         $formFieldNames[] = $fieldName;
-        $viewHelperVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formFieldNames', $formFieldNames);
+        $viewHelperVariableContainer->addOrUpdate(FormViewHelper::class, 'formFieldNames', $formFieldNames);
     }
 }
index 335bb78..df7e5c7 100644 (file)
@@ -32,7 +32,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  * You can also use the "property" attribute if you have bound an object to the form.
  * See :ref:`<f:form> <typo3-fluid-form>` for more documentation.
  */
-class HiddenViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class HiddenViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index ce9a580..b1b6f42 100644 (file)
@@ -29,7 +29,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  *
  *    <input type="password" name="myPassword" value="default value" />
  */
-class PasswordViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class PasswordViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index 027e185..f3b707a 100644 (file)
@@ -60,7 +60,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  *
  * Depending on property ``newsletter``.
  */
-class RadioViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class RadioViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index 94f9d8c..be2ccff 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Form\Select;
 
+use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper;
+
 /**
  * Adds custom :html:`<optgroup>` tags inside an :ref:`<f:form.select> <typo3-fluid-form-select>`,
  * supports further child :ref:`<f:form.select.option> <typo3-fluid-form-select-option>` tags.
  */
-class OptgroupViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class OptgroupViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index 64fce26..99913d5 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Form\Select;
 
+use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelper;
 
 /**
  * Adds custom :html:`<option>` tags inside an :ref:`<f:form.select> <typo3-fluid-form-select>`.
  */
-class OptionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class OptionViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index 038f6a7..d702109 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
 
+use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
+
 /**
  * This ViewHelper generates a :html:`<select>` dropdown list for the use with a form.
  *
@@ -88,7 +91,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  *
  * The ``value`` property now expects a domain object, and tests for object equivalence.
  */
-class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class SelectViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
@@ -235,12 +238,12 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie
         foreach ($optionsArgument as $key => $value) {
             if (is_object($value) || is_array($value)) {
                 if ($this->hasArgument('optionValueField')) {
-                    $key = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($value, $this->arguments['optionValueField']);
+                    $key = ObjectAccess::getPropertyPath($value, $this->arguments['optionValueField']);
                     if (is_object($key)) {
                         if (method_exists($key, '__toString')) {
                             $key = (string)$key;
                         } else {
-                            throw new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception('Identifying value for object of class "' . get_class($value) . '" was an object.', 1247827428);
+                            throw new Exception('Identifying value for object of class "' . get_class($value) . '" was an object.', 1247827428);
                         }
                     }
                 } elseif ($this->persistenceManager->getIdentifierByObject($value) !== null) {
@@ -249,15 +252,15 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie
                 } elseif (method_exists($value, '__toString')) {
                     $key = (string)$value;
                 } else {
-                    throw new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception('No identifying value for object of class "' . get_class($value) . '" found.', 1247826696);
+                    throw new Exception('No identifying value for object of class "' . get_class($value) . '" found.', 1247826696);
                 }
                 if ($this->hasArgument('optionLabelField')) {
-                    $value = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($value, $this->arguments['optionLabelField']);
+                    $value = ObjectAccess::getPropertyPath($value, $this->arguments['optionLabelField']);
                     if (is_object($value)) {
                         if (method_exists($value, '__toString')) {
                             $value = (string)$value;
                         } else {
-                            throw new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception('Label value for object of class "' . get_class($value) . '" was an object without a __toString() method.', 1247827553);
+                            throw new Exception('Label value for object of class "' . get_class($value) . '" was an object without a __toString() method.', 1247827553);
                         }
                     }
                 } elseif (method_exists($value, '__toString')) {
@@ -327,7 +330,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie
     {
         if (is_object($valueElement)) {
             if ($this->hasArgument('optionValueField')) {
-                return \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($valueElement, $this->arguments['optionValueField']);
+                return ObjectAccess::getPropertyPath($valueElement, $this->arguments['optionValueField']);
             }
             // @todo use $this->persistenceManager->isNewObject() once it is implemented
             if ($this->persistenceManager->getIdentifierByObject($valueElement) !== null) {
index 64be769..dd08a49 100644 (file)
@@ -43,7 +43,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  *
  *    <input type="submit" name="mySubmit" value="Send Mail" />
  */
-class SubmitViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class SubmitViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index fe3f689..08900b4 100644 (file)
@@ -31,7 +31,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  *
  *    <textarea name="myTextArea">This is shown inside the textarea</textarea>
  */
-class TextareaViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class TextareaViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index 5a29aa8..5a92554 100644 (file)
@@ -30,7 +30,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  *
  *    <input type="file" name="file" />
  */
-class UploadViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
+class UploadViewHelper extends AbstractFormFieldViewHelper
 {
     /**
      * @var string
index 962b42a..7027658 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers;
 
+use TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService;
 use TYPO3\CMS\Extbase\Mvc\RequestInterface;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
+use TYPO3\CMS\Extbase\Security\Cryptography\HashService;
+use TYPO3\CMS\Extbase\Service\ExtensionService;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper;
 
 /**
  * Form ViewHelper. Generates a :html:`<form>` Tag.
@@ -52,7 +57,7 @@ use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
  * This automatically inserts the value of ``{customer.name}`` inside the
  * textbox and adjusts the name of the textbox accordingly.
  */
-class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper
+class FormViewHelper extends AbstractFormViewHelper
 {
     /**
      * @var string
@@ -85,7 +90,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
     /**
      * @param \TYPO3\CMS\Extbase\Security\Cryptography\HashService $hashService
      */
-    public function injectHashService(\TYPO3\CMS\Extbase\Security\Cryptography\HashService $hashService)
+    public function injectHashService(HashService $hashService)
     {
         $this->hashService = $hashService;
     }
@@ -93,7 +98,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
     /**
      * @param \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
      */
-    public function injectMvcPropertyMappingConfigurationService(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
+    public function injectMvcPropertyMappingConfigurationService(MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
     {
         $this->mvcPropertyMappingConfigurationService = $mvcPropertyMappingConfigurationService;
     }
@@ -101,7 +106,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
     /**
      * @param \TYPO3\CMS\Extbase\Service\ExtensionService $extensionService
      */
-    public function injectExtensionService(\TYPO3\CMS\Extbase\Service\ExtensionService $extensionService)
+    public function injectExtensionService(ExtensionService $extensionService)
     {
         $this->extensionService = $extensionService;
     }
@@ -454,8 +459,8 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH
     protected function removeCheckboxFieldNamesFromViewHelperVariableContainer()
     {
         $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
-        if ($viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::class, 'checkboxFieldNames')) {
-            $viewHelperVariableContainer->remove(\TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper::class, 'checkboxFieldNames');
+        if ($viewHelperVariableContainer->exists(CheckboxViewHelper::class, 'checkboxFieldNames')) {
+            $viewHelperVariableContainer->remove(CheckboxViewHelper::class, 'checkboxFieldNames');
         }
     }
 
index 9e472f3..5a37e1e 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers;
 
 use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
 use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;
+use TYPO3\CMS\Extbase\Service\ImageService;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
 
@@ -101,7 +102,7 @@ class ImageViewHelper extends AbstractTagBasedViewHelper
     /**
      * @param \TYPO3\CMS\Extbase\Service\ImageService $imageService
      */
-    public function injectImageService(\TYPO3\CMS\Extbase\Service\ImageService $imageService)
+    public function injectImageService(ImageService $imageService)
     {
         $this->imageService = $imageService;
     }
index aba566e..6eb7d6b 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Fluid\ViewHelpers;
 
+use TYPO3\CMS\Fluid\Core\Widget\Exception\RenderingContextNotFoundException;
+use TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetRequestNotFoundException;
+use TYPO3\CMS\Fluid\Core\Widget\WidgetRequest;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
@@ -71,8 +74,8 @@ class RenderChildrenViewHelper extends AbstractViewHelper
     protected static function getWidgetRenderingContext(RenderingContextInterface $renderingContext)
     {
         $subRenderingContext = static::getWidgetContext($renderingContext)->getViewHelperChildNodeRenderingContext();
-        if (!$subRenderingContext instanceof \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface) {
-            throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\RenderingContextNotFoundException('Rendering Context not found inside Widget. <f:renderChildren> has been used in an AJAX Request, but is only usable in non-ajax mode.', 1284986604);
+        if (!$subRenderingContext instanceof RenderingContextInterface) {
+            throw new RenderingContextNotFoundException('Rendering Context not found inside Widget. <f:renderChildren> has been used in an AJAX Request, but is only usable in non-ajax mode.', 1284986604);
         }
         return $subRenderingContext;
     }
@@ -94,8 +97,8 @@ class RenderChildrenViewHelper extends AbstractViewHelper
     protected static function getWidgetContext(RenderingContextInterface $renderingContext)
     {
         $request = $renderingContext->getControllerContext()->getRequest();
-        if (!$request instanceof \TYPO3\CMS\Fluid\Core\Widget\WidgetRequest) {
-            throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetRequestNotFoundException('The Request is not a WidgetRequest! <f:renderChildren> must be called inside a Widget Template.', 1284986120);
+        if (!$request instanceof WidgetRequest) {
+            throw new WidgetRequestNotFoundException('The Request is not a WidgetRequest! <f:renderChildren> must be called inside a Widget Template.', 1284986120);
         }
         return $request->getWidgetContext();
     }
index 42fb862..b98b7c1 100644 (file)
@@ -16,6 +16,8 @@
 namespace TYPO3\CMS\Fluid\ViewHelpers\Widget;
 
 use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
+use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper;
+use TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\AutocompleteController;
 
 /**
  * Simple autocomplete widget.
@@ -48,7 +50,7 @@ use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
  * See Resources/Private/Templates/ViewHelpers/Widget/Autocomplete/Index.html
  * @deprecated since TYPO3 v10.4, will be removed in TYPO3 v11.0.
  */
-class AutocompleteViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
+class AutocompleteViewHelper extends AbstractWidgetViewHelper
 {
     /**
      * @var bool
@@ -79,7 +81,7 @@ class AutocompleteViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidget
     /**
      * @param \TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\AutocompleteController $controller
      */
-    public function injectAutocompleteController(\TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\AutocompleteController $controller)
+    public function injectAutocompleteController(AutocompleteController $controller)
     {
         $this->controller = $controller;
     }
index c64a08b..5b32b59 100644 (file)
 
 namespace TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller;
 
+use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
+use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController;
+
 /**
  * Class AutocompleteController
  * @deprecated since TYPO3 v10.4, will be removed in TYPO3 v11.0.
  */
-class AutocompleteController extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController
+class AutocompleteController extends AbstractWidgetController
 {
     public function __construct()
     {
@@ -51,7 +54,7 @@ class AutocompleteController extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidget
         $results = $query->execute();
         $output = [];
         foreach ($results as $singleResult) {
-            $val = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($singleResult, $searchProperty);
+            $val = ObjectAccess::getProperty($singleResult, $searchProperty);
             $output[] = [
                 'id' => $val,
                 'label' => $val,
index e0868a1..cbe2636 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Widget;
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
 use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
 use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper;
+use TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController;
 
 /**
  * This ViewHelper renders a Pagination of objects.
@@ -67,7 +68,7 @@ class PaginateViewHelper extends AbstractWidgetViewHelper
     /**
      * @param \TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController $controller
      */
-    public function injectPaginateController(\TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController $controller)
+    public function injectPaginateController(PaginateController $controller)
     {
         $this->controller = $controller;
     }
index e85dce1..936a51c 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Fluid\Tests\Functional\View;
 use TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait;
 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
+use TYPO3Fluid\FluidTest\Controller\TemplateController;
 
 class TemplatesPathsTest extends FunctionalTestCase
 {
@@ -54,8 +55,8 @@ class TemplatesPathsTest extends FunctionalTestCase
                         'plugins' => [
                             'Pi' => [
                                 'controllers' => [
-                                    \TYPO3Fluid\FluidTest\Controller\TemplateController::class => [
-                                        'className' => \TYPO3Fluid\FluidTest\Controller\TemplateController::class,
+                                    TemplateController::class => [
+                                        'className' => TemplateController::class,
                                         'alias' => 'Template',
                                         'actions' => [
                                             'baseTemplate',
index 6d1d693..16002e3 100644 (file)
@@ -80,7 +80,7 @@ class RenderingContextTest extends UnitTestCase
      */
     public function controllerContextCanBeReadCorrectly()
     {
-        $controllerContext = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class)
+        $controllerContext = $this->getMockBuilder(ControllerContext::class)
             ->disableOriginalConstructor()
             ->getMock();
         $controllerContext->expects(self::atLeastOnce())->method('getRequest')->willReturn($this->createMock(Request::class));
index 4a0f17a..171a0ed 100644 (file)
@@ -17,8 +17,11 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Mvc\Controller\Arguments;
+use TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService;
 use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\ResponseInterface;
+use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
+use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController;
 use TYPO3\CMS\Fluid\Core\Widget\WidgetRequest;
 use TYPO3\CMS\Fluid\View\TemplatePaths;
@@ -36,12 +39,12 @@ class AbstractWidgetControllerTest extends UnitTestCase
     public function canHandleWidgetRequest()
     {
         /** @var WidgetRequest|\PHPUnit\Framework\MockObject\MockObject $request */
-        $request = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class)
+        $request = $this->getMockBuilder(WidgetRequest::class)
             ->setMethods(['dummy'])
             ->disableOriginalConstructor()
             ->getMock();
         /** @var AbstractWidgetController|\PHPUnit\Framework\MockObject\MockObject $abstractWidgetController */
-        $abstractWidgetController = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class)
+        $abstractWidgetController = $this->getMockBuilder(AbstractWidgetController::class)
             ->setMethods(['dummy'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -56,17 +59,17 @@ class AbstractWidgetControllerTest extends UnitTestCase
         $widgetContext = $this->createMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
         $widgetContext->expects(self::once())->method('getWidgetConfiguration')->willReturn('myConfiguration');
         /** @var WidgetRequest|\PHPUnit\Framework\MockObject\MockObject $request */
-        $request = $this->createMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class);
+        $request = $this->createMock(WidgetRequest::class);
         $request->expects(self::once())->method('getWidgetContext')->willReturn($widgetContext);
         /** @var ResponseInterface|\PHPUnit\Framework\MockObject\MockObject $response */
-        $response = $this->createMock(\TYPO3\CMS\Extbase\Mvc\ResponseInterface::class);
+        $response = $this->createMock(ResponseInterface::class);
         /** @var AbstractWidgetController|\PHPUnit\Framework\MockObject\MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface $abstractWidgetController */
-        $abstractWidgetController = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController::class, ['resolveActionMethodName', 'initializeActionMethodArguments', 'initializeActionMethodValidators', 'initializeAction', 'checkRequestHash', 'mapRequestArgumentsToControllerArguments', 'buildControllerContext', 'resolveView', 'callActionMethod'], [], '', false);
-        $mockUriBuilder = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
-        $objectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
-        $objectManager->expects(self::any())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class)->willReturn($mockUriBuilder);
+        $abstractWidgetController = $this->getAccessibleMock(AbstractWidgetController::class, ['resolveActionMethodName', 'initializeActionMethodArguments', 'initializeActionMethodValidators', 'initializeAction', 'checkRequestHash', 'mapRequestArgumentsToControllerArguments', 'buildControllerContext', 'resolveView', 'callActionMethod'], [], '', false);
+        $mockUriBuilder = $this->createMock(UriBuilder::class);
+        $objectManager = $this->createMock(ObjectManagerInterface::class);
+        $objectManager->expects(self::any())->method('get')->with(UriBuilder::class)->willReturn($mockUriBuilder);
 
-        $configurationService = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class);
+        $configurationService = $this->createMock(MvcPropertyMappingConfigurationService::class);
         $abstractWidgetController->_set('mvcPropertyMappingConfigurationService', $configurationService);
         $abstractWidgetController->_set('arguments', new Arguments());
 
index 0ef54cb..9330e62 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
+use TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder;
 use TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetContextNotFoundException;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
@@ -29,7 +30,7 @@ class AjaxWidgetContextHolderTest extends UnitTestCase
     public function getThrowsExceptionIfWidgetContextIsNotFound()
     {
         /** @var \TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder */
-        $ajaxWidgetContextHolder = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder::class)
+        $ajaxWidgetContextHolder = $this->getMockBuilder(AjaxWidgetContextHolder::class)
             ->setMethods(['dummy'])
             ->disableOriginalConstructor()
             ->getMock();
index 0af377e..1adc671 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
 use TYPO3\CMS\Fluid\Core\Widget\WidgetContext;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode;
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 
 /**
  * Test case
@@ -31,7 +33,7 @@ class WidgetContextTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->widgetContext = new \TYPO3\CMS\Fluid\Core\Widget\WidgetContext();
+        $this->widgetContext = new WidgetContext();
     }
 
     /**
@@ -117,8 +119,8 @@ class WidgetContextTest extends UnitTestCase
      */
     public function viewHelperChildNodesCanBeReadAgain()
     {
-        $viewHelperChildNodes = $this->createMock(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode::class);
-        $renderingContext = $this->createMock(\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface::class);
+        $viewHelperChildNodes = $this->createMock(RootNode::class);
+        $renderingContext = $this->createMock(RenderingContextInterface::class);
         $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext);
         self::assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes());
         self::assertSame($renderingContext, $this->widgetContext->getViewHelperChildNodeRenderingContext());
index c44cb61..9926b2a 100644 (file)
@@ -15,7 +15,9 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
+use Prophecy\Argument;
 use TYPO3\CMS\Extbase\Mvc\Dispatcher;
+use TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHandler;
 use TYPO3\CMS\Extbase\Mvc\Web\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
@@ -39,7 +41,7 @@ class WidgetRequestHandlerTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->widgetRequestHandler = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequestHandler::class, ['dummy'], [], '', false);
+        $this->widgetRequestHandler = $this->getAccessibleMock(WidgetRequestHandler::class, ['dummy'], [], '', false);
     }
 
     /**
@@ -65,7 +67,7 @@ class WidgetRequestHandlerTest extends UnitTestCase
      */
     public function priorityIsHigherThanDefaultRequestHandler()
     {
-        $defaultWebRequestHandler = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHandler::class)
+        $defaultWebRequestHandler = $this->getMockBuilder(AbstractRequestHandler::class)
             ->setMethods(['handleRequest'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -85,7 +87,7 @@ class WidgetRequestHandlerTest extends UnitTestCase
         $requestBuilder->expects(self::once())->method('build')->willReturn($request);
         $objectManager = $this->prophesize(ObjectManager::class);
         $handler->injectObjectManager($objectManager->reveal());
-        $objectManager->get(\Prophecy\Argument::any())->willReturn($this->createMock(Response::class));
+        $objectManager->get(Argument::any())->willReturn($this->createMock(Response::class));
         $requestDispatcher = $this->getMockBuilder(Dispatcher::class)
             ->setMethods(['dispatch'])
             ->disableOriginalConstructor()
index e49cfe6..1149a28 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
+use TYPO3\CMS\Fluid\Core\Widget\WidgetContext;
+use TYPO3\CMS\Fluid\Core\Widget\WidgetRequest;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -27,11 +29,11 @@ class WidgetRequestTest extends UnitTestCase
      */
     public function setWidgetContextAlsoSetsControllerObjectName()
     {
-        $widgetContext = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class)
+        $widgetContext = $this->getMockBuilder(WidgetContext::class)
             ->setMethods(['getControllerObjectName'])
             ->getMock();
         $widgetContext->expects(self::once())->method('getControllerObjectName')->willReturn('Tx_Fluid_ControllerObjectName');
-        $widgetRequest = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class)
+        $widgetRequest = $this->getMockBuilder(WidgetRequest::class)
             ->setMethods(['setControllerObjectName'])
             ->getMock();
         $widgetRequest->expects(self::once())->method('setControllerObjectName')->with('Tx_Fluid_ControllerObjectName');
@@ -43,12 +45,12 @@ class WidgetRequestTest extends UnitTestCase
      */
     public function getArgumentPrefixReadsVariablesFromWidgetContext()
     {
-        $widgetContext = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class)
+        $widgetContext = $this->getMockBuilder(WidgetContext::class)
             ->setMethods(['getParentPluginNamespace', 'getWidgetIdentifier'])
             ->getMock();
         $widgetContext->expects(self::once())->method('getParentPluginNamespace')->willReturn('foo');
         $widgetContext->expects(self::once())->method('getWidgetIdentifier')->willReturn('bar');
-        $widgetRequest = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class, ['dummy']);
+        $widgetRequest = $this->getAccessibleMock(WidgetRequest::class, ['dummy']);
         $widgetRequest->_set('widgetContext', $widgetContext);
         self::assertEquals('foo[bar]', $widgetRequest->getArgumentPrefix());
     }
@@ -58,8 +60,8 @@ class WidgetRequestTest extends UnitTestCase
      */
     public function widgetContextCanBeReadAgain()
     {
-        $widgetContext = $this->createMock(\TYPO3\CMS\Fluid\Core\Widget\WidgetContext::class);
-        $widgetRequest = $this->getMockBuilder(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class)
+        $widgetContext = $this->createMock(WidgetContext::class);
+        $widgetRequest = $this->getMockBuilder(WidgetRequest::class)
             ->setMethods(['setControllerObjectName'])
             ->getMock();
         $widgetRequest->setWidgetContext($widgetContext);
index 7f78a97..bbe491b 100644 (file)
@@ -25,6 +25,7 @@ use TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
 
 /**
  * Test case
@@ -147,7 +148,7 @@ class CObjectViewHelperTest extends ViewHelperBaseTestcase
             ]
         );
 
-        $this->expectException(\TYPO3Fluid\Fluid\Core\ViewHelper\Exception::class);
+        $this->expectException(Exception::class);
         $this->expectExceptionCode($exceptionCode);
         $this->viewHelper->initializeArgumentsAndRender();
     }
index 09e8ee3..7f2d46e 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
+use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ClassWithTwoGetters;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper;
 use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper;
 
@@ -73,7 +74,7 @@ class AbstractFormFieldViewHelperTest extends FormFieldViewHelperBaseTestcase
         $this->injectDependenciesIntoViewHelper($formViewHelper);
         $formViewHelper->_set('respectSubmittedDataValue', false);
 
-        $mockObject = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ClassWithTwoGetters('testing', 1476108385);
+        $mockObject = new ClassWithTwoGetters('testing', 1476108385);
 
         $formViewHelper->expects(self::any())->method('isObjectAccessorMode')->willReturn(true);
         $this->viewHelperVariableContainer->get(FormViewHelper::class, 'formObject')
@@ -264,7 +265,7 @@ class AbstractFormFieldViewHelperTest extends FormFieldViewHelperBaseTestcase
      */
     public function addAdditionalIdentityPropertiesIfNeededCallsRenderIdentityFieldWithTheRightParameters()
     {
-        $mockFormObject = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ClassWithTwoGetters();
+        $mockFormObject = new ClassWithTwoGetters();
 
         $property = 'value.something';
         $objectName = 'myObject';
@@ -312,7 +313,7 @@ class AbstractFormFieldViewHelperTest extends FormFieldViewHelperBaseTestcase
      */
     public function addAdditionalIdentityPropertiesIfNeededCallsRenderIdentityFieldWithTheRightParametersWithMoreHierarchyLevels(
     ) {
-        $mockFormObject = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ClassWithTwoGetters();
+        $mockFormObject = new ClassWithTwoGetters();
         $property = 'value.value.something';
         $objectName = 'myObject';
         $expectedProperty1 = 'myObject[value]';
index 0376be3..fd852b9 100644 (file)
@@ -16,6 +16,8 @@
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
 use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ExtendsAbstractEntity;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper;
+use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 
 /**
@@ -31,7 +33,7 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
         $extendsAbstractEntity = new ExtendsAbstractEntity();
         $extendsAbstractEntity->_setProperty('uid', 123);
         $expectedResult = chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />' . chr(10);
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, ['prefixFieldName', 'registerFieldNameForFormTokenGeneration'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(FormViewHelper::class, ['prefixFieldName', 'registerFieldNameForFormTokenGeneration'], [], '', false);
         $viewHelper->expects(self::any())->method('prefixFieldName')->with('theName')->willReturn('prefix[theName]');
         $actualResult = $viewHelper->_call('renderHiddenIdentityField', $extendsAbstractEntity, 'theName');
         self::assertSame($expectedResult, $actualResult);
@@ -46,7 +48,7 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
         $extendsAbstractEntity->_setProperty('uid', 123);
         $object = clone $extendsAbstractEntity;
         $expectedResult = chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />' . chr(10);
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, ['prefixFieldName', 'registerFieldNameForFormTokenGeneration'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(FormViewHelper::class, ['prefixFieldName', 'registerFieldNameForFormTokenGeneration'], [], '', false);
         $viewHelper->expects(self::any())->method('prefixFieldName')->with('theName')->willReturn('prefix[theName]');
         $actualResult = $viewHelper->_call('renderHiddenIdentityField', $extendsAbstractEntity, 'theName');
         self::assertSame($expectedResult, $actualResult);
@@ -57,7 +59,7 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
      */
     public function prefixFieldNameReturnsEmptyStringIfGivenFieldNameIsNULL()
     {
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, ['dummy'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(AbstractFormViewHelper::class, ['dummy'], [], '', false);
         $this->injectDependenciesIntoViewHelper($viewHelper);
         self::assertSame('', $viewHelper->_call('prefixFieldName', null));
     }
@@ -67,7 +69,7 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
      */
     public function prefixFieldNameReturnsEmptyStringIfGivenFieldNameIsEmpty()
     {
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, ['dummy'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(AbstractFormViewHelper::class, ['dummy'], [], '', false);
         $this->injectDependenciesIntoViewHelper($viewHelper);
         self::assertSame('', $viewHelper->_call('prefixFieldName', ''));
     }
@@ -77,10 +79,10 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
      */
     public function prefixFieldNameReturnsGivenFieldNameIfFieldNamePrefixIsEmpty()
     {
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, ['dummy'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(AbstractFormViewHelper::class, ['dummy'], [], '', false);
         $this->injectDependenciesIntoViewHelper($viewHelper);
-        $this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->willReturn(true);
-        $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->willReturn('');
+        $this->viewHelperVariableContainer->exists(FormViewHelper::class, 'fieldNamePrefix')->willReturn(true);
+        $this->viewHelperVariableContainer->get(FormViewHelper::class, 'fieldNamePrefix')->willReturn('');
         self::assertSame('someFieldName', $viewHelper->_call('prefixFieldName', 'someFieldName'));
     }
 
@@ -89,10 +91,10 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
      */
     public function prefixFieldNamePrefixesGivenFieldNameWithFieldNamePrefix()
     {
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, ['dummy'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(AbstractFormViewHelper::class, ['dummy'], [], '', false);
         $this->injectDependenciesIntoViewHelper($viewHelper);
-        $this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->willReturn(true);
-        $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->willReturn('somePrefix');
+        $this->viewHelperVariableContainer->exists(FormViewHelper::class, 'fieldNamePrefix')->willReturn(true);
+        $this->viewHelperVariableContainer->get(FormViewHelper::class, 'fieldNamePrefix')->willReturn('somePrefix');
         self::assertSame('somePrefix[someFieldName]', $viewHelper->_call('prefixFieldName', 'someFieldName'));
     }
 
@@ -101,10 +103,10 @@ class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
      */
     public function prefixFieldNamePreservesSquareBracketsOfFieldName()
     {
-        $viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewHelper::class, ['dummy'], [], '', false);
+        $viewHelper = $this->getAccessibleMock(AbstractFormViewHelper::class, ['dummy'], [], '', false);
         $this->injectDependenciesIntoViewHelper($viewHelper);
-        $this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->willReturn(true);
-        $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'fieldNamePrefix')->willReturn('somePrefix[foo]');
+        $this->viewHelperVariableContainer->exists(FormViewHelper::class, 'fieldNamePrefix')->willReturn(true);
+        $this->viewHelperVariableContainer->get(FormViewHelper::class, 'fieldNamePrefix')->willReturn('somePrefix[foo]');
         self::assertSame('somePrefix[foo][someFieldName][bar]', $viewHelper->_call('prefixFieldName', 'someFieldName[bar]'));
     }
 }
index 79d1ff3..865c499 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures;
 
+use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode;
+
 /**
  * [Enter description here]
  */
-class EmptySyntaxTreeNode extends \TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode
+class EmptySyntaxTreeNode extends ViewHelperNode
 {
     public function __construct()
     {
index 45f52f1..7418810 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures;
 
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
+
 /**
  * Class ExtendsAbstractEntity
  */
-class ExtendsAbstractEntity extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+class ExtendsAbstractEntity extends AbstractEntity
 {
 }
index 75baf78..9a85c32 100644 (file)
@@ -21,7 +21,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 /**
  * Test for the "Hidden" Form view helper
  */
-class HiddenViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\FormFieldViewHelperBaseTestcase
+class HiddenViewHelperTest extends FormFieldViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Form\HiddenViewHelper
index 156c65c..4c0a06d 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
+use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\EmptySyntaxTreeNode;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
 /**
  * Test for the "Password" Form view helper
  */
-class PasswordViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\FormFieldViewHelperBaseTestcase
+class PasswordViewHelperTest extends FormFieldViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper
@@ -30,7 +32,7 @@ class PasswordViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
     protected function setUp(): void
     {
         parent::setUp();
-        $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\PasswordViewHelper::class, ['setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration']);
+        $this->viewHelper = $this->getAccessibleMock(PasswordViewHelper::class, ['setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration']);
         $this->arguments['name'] = '';
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
     }
@@ -71,7 +73,7 @@ class PasswordViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\For
         ];
         $this->viewHelper->setArguments($arguments);
 
-        $this->viewHelper->setViewHelperNode(new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $this->viewHelper->initializeArgumentsAndRender();
     }
 
index a5060b3..9746469 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
+use TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
 /**
  * Test for the "Submit" Form view helper
  */
-class SubmitViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\FormFieldViewHelperBaseTestcase
+class SubmitViewHelperTest extends FormFieldViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper
@@ -30,7 +31,7 @@ class SubmitViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
     protected function setUp(): void
     {
         parent::setUp();
-        $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\SubmitViewHelper::class, ['dummy']);
+        $this->viewHelper = $this->getAccessibleMock(SubmitViewHelper::class, ['dummy']);
         $this->arguments['name'] = '';
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
     }
index ec1a9c1..914d9f0 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
+use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\EmptySyntaxTreeNode;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\TextareaViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
@@ -62,7 +63,7 @@ class TextareaViewHelperTest extends FormFieldViewHelperBaseTestcase
         ];
         $this->viewHelper->setArguments($arguments);
 
-        $this->viewHelper->setViewHelperNode(new Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $actual = $this->viewHelper->initializeArgumentsAndRender();
         $expected = '<textarea name="NameOfTextarea">Current value</textarea>';
         self::assertSame($expected, $actual);
@@ -88,7 +89,7 @@ class TextareaViewHelperTest extends FormFieldViewHelperBaseTestcase
         ];
         $this->viewHelper->setArguments($arguments);
 
-        $this->viewHelper->setViewHelperNode(new Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $actual = $this->viewHelper->initializeArgumentsAndRender();
         $expected = '<textarea name="NameOfTextarea">some &lt;tag&gt; &amp; &quot;quotes&quot;</textarea>';
         self::assertSame($expected, $actual);
@@ -105,7 +106,7 @@ class TextareaViewHelperTest extends FormFieldViewHelperBaseTestcase
         ];
         $this->viewHelper->setArguments($arguments);
 
-        $this->viewHelper->setViewHelperNode(new Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $actual = $this->viewHelper->initializeArgumentsAndRender();
         $expected = '<textarea placeholder="SomePlaceholder" name="NameOfTextarea"></textarea>';
         self::assertSame($expected, $actual);
@@ -122,7 +123,7 @@ class TextareaViewHelperTest extends FormFieldViewHelperBaseTestcase
         ];
         $this->viewHelper->setArguments($arguments);
 
-        $this->viewHelper->setViewHelperNode(new Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $actual = $this->viewHelper->initializeArgumentsAndRender();
         $expected = '<textarea readonly="foo" name="NameOfTextarea"></textarea>';
         self::assertSame($expected, $actual);
@@ -139,7 +140,7 @@ class TextareaViewHelperTest extends FormFieldViewHelperBaseTestcase
         ];
         $this->viewHelper->setArguments($arguments);
 
-        $this->viewHelper->setViewHelperNode(new Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $actual = $this->viewHelper->initializeArgumentsAndRender();
         $expected = '<textarea name="NameOfTextarea" required="required"></textarea>';
         self::assertSame($expected, $actual);
index bcfa8bc..7a04245 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\EmptySyntaxTreeNode;
+use TYPO3\CMS\Fluid\ViewHelpers\Form\UploadViewHelper;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
@@ -31,7 +34,7 @@ class UploadViewHelperTest extends ViewHelperBaseTestcase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Form\UploadViewHelper::class, ['setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration']);
+        $this->viewHelper = $this->getAccessibleMock(UploadViewHelper::class, ['setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration']);
         $this->arguments['name'] = '';
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
     }
@@ -41,7 +44,7 @@ class UploadViewHelperTest extends ViewHelperBaseTestcase
      */
     public function renderCorrectlySetsTagName()
     {
-        $this->tagBuilder = $this->createMock(\TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder::class);
+        $this->tagBuilder = $this->createMock(TagBuilder::class);
         $this->tagBuilder->expects(self::atLeastOnce())->method('setTagName')->with('input');
         $this->viewHelper->setTagBuilder($this->tagBuilder);
         $this->viewHelper->initializeArgumentsAndRender();
@@ -69,7 +72,7 @@ class UploadViewHelperTest extends ViewHelperBaseTestcase
             'name' => 'someName'
         ];
         $this->viewHelper->setArguments($arguments);
-        $this->viewHelper->setViewHelperNode(new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\EmptySyntaxTreeNode());
+        $this->viewHelper->setViewHelperNode(new EmptySyntaxTreeNode());
         $this->viewHelper->initializeArgumentsAndRender();
     }
 
@@ -88,7 +91,7 @@ class UploadViewHelperTest extends ViewHelperBaseTestcase
     public function renderSetsAttributeNameAsArrayIfMultipleIsGiven()
     {
         /** @var TagBuilder $tagBuilder */
-        $tagBuilder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TagBuilder::class);
+        $tagBuilder = GeneralUtility::makeInstance(TagBuilder::class);
         $tagBuilder->addAttribute('multiple', 'multiple');
         $this->viewHelper->setTagBuilder($tagBuilder);
         $arguments = [
index fba0c1d..89c5894 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
 
 use TYPO3\CMS\Fluid\ViewHelpers\Format\CaseViewHelper;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
 
 /**
  * Test case
@@ -70,7 +71,7 @@ class CaseViewHelperTest extends ViewHelperBaseTestcase
      */
     public function viewHelperThrowsExceptionIfIncorrectModeIsGiven()
     {
-        $this->expectException(\TYPO3Fluid\Fluid\Core\ViewHelper\Exception::class);
+        $this->expectException(Exception::class);
         $this->expectExceptionCode(1358349150);
         $this->setArgumentsUnderTest(
             $this->viewHelper,
index 9140d3a..e727fef 100644 (file)
@@ -21,6 +21,7 @@ use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Extbase\Service\ImageService;
 use TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
 /**
@@ -67,7 +68,7 @@ class ImageViewHelperTest extends ViewHelperBaseTestcase
     {
         $this->setArgumentsUnderTest($this->viewHelper, $arguments);
 
-        $this->expectException(\TYPO3Fluid\Fluid\Core\ViewHelper\Exception::class);
+        $this->expectException(Exception::class);
         $this->expectExceptionCode(1382284106);
 
         $this->viewHelper->render();
index 53284ee..69226ed 100644 (file)
@@ -40,7 +40,7 @@ class EmailViewHelperTest extends ViewHelperBaseTestcase
     {
         parent::setUp();
         $GLOBALS['TSFE'] = new \stdClass();
-        $GLOBALS['TSFE']->cObj = $this->createMock(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        $GLOBALS['TSFE']->cObj = $this->createMock(ContentObjectRenderer::class);
         $this->viewHelper = $this->getAccessibleMock(EmailViewHelper::class, ['renderChildren']);
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
     }
index e80087e..ae376e4 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
 
+use TYPO3\CMS\Fluid\ViewHelpers\Link\ExternalViewHelper;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
@@ -31,7 +32,7 @@ class ExternalViewHelperTest extends ViewHelperBaseTestcase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->viewHelper = $this->getAccessibleMock(\TYPO3\CMS\Fluid\ViewHelpers\Link\ExternalViewHelper::class, ['renderChildren']);
+        $this->viewHelper = $this->getAccessibleMock(ExternalViewHelper::class, ['renderChildren']);
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
     }
 
index 0128e1f..4841f9f 100644 (file)
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
 
+use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\PageViewHelper;
@@ -60,7 +61,7 @@ class PageViewHelperTest extends ViewHelperBaseTestcase
         $this->uriBuilder->expects(self::any())->method('setAddQueryStringMethod')->willReturn($this->uriBuilder);
 
         // reset parent controller context and uri builder @todo: remove once fluid-cleanup is merged in testing framework
-        $this->controllerContext = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class);
+        $this->controllerContext = $this->createMock(ControllerContext::class);
         $this->controllerContext->expects(self::any())->method('getUriBuilder')->willReturn($this->uriBuilder);
         $this->controllerContext->expects(self::any())->method('getRequest')->willReturn($this->request->reveal());
         $this->arguments = [];
index b5728b0..091aee9 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
 use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fixtures\TranslateViewHelperFixtureForEmptyString;
 use TYPO3\CMS\Fluid\ViewHelpers\TranslateViewHelper;
 use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
 
 /**
  * Test class for TranslateViewHelper
@@ -37,7 +38,7 @@ class TranslateViewHelperTest extends ViewHelperBaseTestcase
         $this->viewHelper = new TranslateViewHelper();
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
 
-        $this->expectException(\TYPO3Fluid\Fluid\Core\ViewHelper\Exception::class);
+        $this->expectException(Exception::class);
         $this->expectExceptionCode(1351584844);
 
         $this->setArgumentsUnderTest(
index 53de5e2..ebf3107 100644 (file)
 
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Widget\Controller;
 
+use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
+use TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface;
+use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
+use TYPO3\CMS\Extbase\Persistence\Generic\Query;
+use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
+use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
+use TYPO3\CMS\Extbase\Persistence\QueryInterface;
+use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
+use TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -59,22 +68,22 @@ class PaginateControllerTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->query = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Persistence\Generic\Query::class, ['dummy'], ['someType']);
-        $this->querySettings = $this->createMock(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface::class);
+        $this->query = $this->getAccessibleMock(Query::class, ['dummy'], ['someType']);
+        $this->querySettings = $this->createMock(QuerySettingsInterface::class);
         $this->query->_set('querySettings', $this->querySettings);
-        $this->persistenceManager = $this->createMock(\TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::class);
-        $this->backend = $this->createMock(\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface::class);
+        $this->persistenceManager = $this->createMock(PersistenceManagerInterface::class);
+        $this->backend = $this->createMock(BackendInterface::class);
         $this->query->_set('persistenceManager', $this->persistenceManager);
-        $this->dataMapper = $this->createMock(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class);
+        $this->dataMapper = $this->createMock(DataMapper::class);
         $this->query->_set('dataMapper', $this->dataMapper);
         $this->controller = $this->getAccessibleMock(
-            \TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController::class,
+            PaginateController::class,
             ['dummy'],
             [],
             '',
             false
         );
-        $this->controller->_set('view', $this->createMock(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class));
+        $this->controller->_set('view', $this->createMock(ViewInterface::class));
     }
 
     /**
@@ -160,8 +169,8 @@ class PaginateControllerTest extends UnitTestCase
      */
     public function acceptQueryResultInterfaceAsObjects()
     {
-        $mockQueryResult = $this->createMock(\TYPO3\CMS\Extbase\Persistence\QueryResultInterface::class);
-        $mockQuery = $this->createMock(\TYPO3\CMS\Extbase\Persistence\QueryInterface::class);
+        $mockQueryResult = $this->createMock(QueryResultInterface::class);
+        $mockQuery = $this->createMock(QueryInterface::class);
         $mockQueryResult->expects(self::any())->method('getQuery')->willReturn($mockQuery);
         $this->controller->_set('objects', $mockQueryResult);
         $this->controller->_set('widgetConfiguration', ['as' => 'paginatedObjects']);
index 8dd421e..3a8465d 100644 (file)
@@ -18,8 +18,9 @@ namespace TYPO3\CMS\FluidStyledContent\Tests\Functional\Tca;
 use TYPO3\CMS\Backend\Tests\Functional\Form\FormTestService;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
 
-class ContentVisibleFieldsTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
+class ContentVisibleFieldsTest extends FunctionalTestCase
 {
     /**
      * @var array
index 793e813..8fba03d 100644 (file)
@@ -21,6 +21,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
 use TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface;
+use TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface;
 
 /**
  * The abstract form backend controller
@@ -45,7 +46,7 @@ abstract class AbstractBackendController extends ActionController
      * @param \TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface $formPersistenceManager
      * @internal
      */
-    public function injectFormPersistenceManager(\TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface $formPersistenceManager)
+    public function injectFormPersistenceManager(FormPersistenceManagerInterface $formPersistenceManager)
     {
         $this->formPersistenceManager = $formPersistenceManager;
     }
index 3341227..569f2c2 100644 (file)
@@ -28,6 +28,7 @@ use TYPO3\CMS\Form\Domain\Configuration\ConfigurationService;
 use TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Converters\FinisherOptionsFlexFormOverridesConverter;
 use TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Converters\FlexFormFinisherOverridesConverterDto;
 use TYPO3\CMS\Form\Mvc\Configuration\TypoScriptService;
+use TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface;
 
 /**
  * The frontend controller
@@ -47,7 +48,7 @@ class FormFrontendController extends ActionController
      * @param \TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface $formPersistenceManager
      * @internal
      */
-    public function injectFormPersistenceManager(\TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface $formPersistenceManager)
+    public function injectFormPersistenceManager(FormPersistenceManagerInterface $formPersistenceManager)
     {
         $this->formPersistenceManager = $formPersistenceManager;
     }
index 196d294..c8a97a5 100644 (file)
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Form\Controller;
 
 use Symfony\Component\Yaml\Yaml;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Template\Components\ButtonBar;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
&n