[TASK] Use name-resolution instead of strings where possible: 12 68/34868/4
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Dec 2014 13:19:48 +0000 (14:19 +0100)
committerFrank Nägler <typo3@naegler.net>
Fri, 5 Dec 2014 20:30:46 +0000 (21:30 +0100)
(part for extensions starting with "s")

Use name-resolution with ...::class instead of strings where
possible.
(needs PHP 5.5, which is meanwhile required for master)

Change-set Iedbb896607adddce2b23ab67f990fa2296c0d1bb
first introduced usage of ::class in master. We now add it
in various more places.

Change-Id: I54a34f04bf9027051500f574d9760c80fafe05a9
Resolves: #63477
Releases: master
Reviewed-on: http://review.typo3.org/34868
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionTask.php
typo3/sysext/scheduler/Documentation/DevelopersGuide/CreatingTasks/Index.rst
typo3/sysext/scheduler/Tests/Unit/Controller/SchedulerModuleControllerTest.php
typo3/sysext/scheduler/Tests/Unit/Task/CachingFrameworkGarbageCollectionTest.php
typo3/sysext/scheduler/ext_localconf.php
typo3/sysext/setup/ext_tables.php
typo3/sysext/sv/Classes/AuthenticationService.php
typo3/sysext/sv/ext_localconf.php
typo3/sysext/sv/ext_tables.php

index 413e9ef..d70c0c3 100644 (file)
@@ -36,8 +36,8 @@ class CachingFrameworkGarbageCollectionAdditionalFieldProvider implements \TYPO3
                        $taskInfo['scheduler_cachingFrameworkGarbageCollection_selectedBackends'] = array();
                        if ($parentObject->CMD === 'add') {
                                // In case of new task, set to dbBackend if it's available
-                               if (in_array('TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend', $this->getRegisteredBackends())) {
-                                       $taskInfo['scheduler_cachingFrameworkGarbageCollection_selectedBackends'][] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend';
+                               if (in_array(\TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class, $this->getRegisteredBackends())) {
+                                       $taskInfo['scheduler_cachingFrameworkGarbageCollection_selectedBackends'][] = \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class;
                                }
                        } elseif ($parentObject->CMD === 'edit') {
                                // In case of editing the task, set to currently selected value
index 93ca5a0..4f2fbb8 100644 (file)
@@ -49,7 +49,7 @@ class TableGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Schedu
         * @return void
         */
        protected function initDefaultNumberOfDays() {
-               $tableConfiguration = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'];
+               $tableConfiguration = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'];
                foreach ($tableConfiguration as $tableName => $configuration) {
                        if (isset($configuration['expirePeriod'])) {
                                $this->defaultNumberOfDays[$tableName] = $configuration['expirePeriod'];
@@ -92,7 +92,7 @@ class TableGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Schedu
         * @return array Array containing all the information pertaining to the additional fields
         */
        protected function getTableAdditionalField(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) {
-               $tableConfiguration = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'];
+               $tableConfiguration = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'];
                $options = array();
                // Add an empty option on top if an existing task is configured
                // with a table that can not be found in configuration anymore
@@ -207,7 +207,7 @@ class TableGarbageCollectionAdditionalFieldProvider implements \TYPO3\CMS\Schedu
         */
        public function validateTableAdditionalField(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) {
                $validData = FALSE;
-               $tableConfiguration = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'];
+               $tableConfiguration = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'];
                if (!isset($submittedData['scheduler_tableGarbageCollection_table'])) {
                        $validData = TRUE;
                } elseif (array_key_exists($submittedData['scheduler_tableGarbageCollection_table'], $tableConfiguration)) {
index b4ee419..0c3f2a7 100644 (file)
@@ -20,7 +20,7 @@ namespace TYPO3\CMS\Scheduler\Task;
  * This task deletes rows from tables older than the given number of days.
  *
  * Available tables must be registered in
- * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']
+ * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']
  * See ext_localconf.php of scheduler extension for an example
  *
  * @author Christian Kuhn <lolli@schwarzbu.ch>
@@ -49,7 +49,7 @@ class TableGarbageCollectionTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask
         * @return bool TRUE if task run was successful
         */
        public function execute() {
-               $tableConfigurations = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'];
+               $tableConfigurations = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'];
                $tableHandled = FALSE;
                foreach ($tableConfigurations as $tableName => $configuration) {
                        if ($this->allTables || $tableName === $this->table) {
@@ -58,7 +58,7 @@ class TableGarbageCollectionTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask
                        }
                }
                if (!$tableHandled) {
-                       throw new \RuntimeException('TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask misconfiguration: ' . $this->table . ' does not exist in configuration', 1308354399);
+                       throw new \RuntimeException(\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class . ' misconfiguration: ' . $this->table . ' does not exist in configuration', 1308354399);
                }
                return TRUE;
        }
@@ -83,18 +83,18 @@ class TableGarbageCollectionTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask
                                $deleteTimestamp = strtotime('-' . $this->numberOfDays . 'days');
                        } else {
                                if (!isset($configuration['expirePeriod'])) {
-                                       throw new \RuntimeException('TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask misconfiguration: No expirePeriod defined for table ' . $table, 1308355095);
+                                       throw new \RuntimeException(\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class . ' misconfiguration: No expirePeriod defined for table ' . $table, 1308355095);
                                }
                                $deleteTimestamp = strtotime('-' . $configuration['expirePeriod'] . 'days');
                        }
                        $where = $configuration['dateField'] . ' < ' . $deleteTimestamp;
                } else {
-                       throw new \RuntimeException('TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask misconfiguration: Either expireField or dateField must be defined for table ' . $table, 1308355268);
+                       throw new \RuntimeException(\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class . ' misconfiguration: Either expireField or dateField must be defined for table ' . $table, 1308355268);
                }
                $GLOBALS['TYPO3_DB']->exec_DELETEquery($table, $where);
                $error = $GLOBALS['TYPO3_DB']->sql_error();
                if ($error) {
-                       throw new \RuntimeException('TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask failed for table ' . $this->table . ' with error: ' . $error, 1308255491);
+                       throw new \RuntimeException(\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class . ' failed for table ' . $this->table . ' with error: ' . $error, 1308255491);
                }
                return TRUE;
        }
index 707aebb..c67cc78 100644 (file)
@@ -275,11 +275,11 @@ task. Let's look at one of the base classes declaration as an example:
 ::
 
        // Add caching framework garbage collection task
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionTask'] = array(
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask::class] = array(
                'extension' => $_EXTKEY,
                'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.name',
                'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.description',
-               'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionAdditionalFieldProvider'
+               'additionalFields' => \TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionAdditionalFieldProvider::class
        );
 
 The registration is made in the array
@@ -328,7 +328,7 @@ simple as possible. Consider the following:
 
        class MyTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                public function execute() {
-                       $businessLogic = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Vendor\\Extension\\BusinessLogic');
+                       $businessLogic = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Vendor\Extension\BusinessLogic::class);
                        $businessLogic->run(arg1, arg2, …);
                }
        }
index 12ac2f1..b7bd235 100644 (file)
@@ -32,7 +32,7 @@ class SchedulerModuleControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
-               $this->testObject = $this->getMock('TYPO3\\CMS\\Scheduler\\Controller\\SchedulerModuleController', array('dummy'), array(), '', FALSE);
+               $this->testObject = $this->getMock(\TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::class, array('dummy'), array(), '', FALSE);
        }
 
        /**
index 83fbfc1..a0c7ac8 100644 (file)
@@ -46,21 +46,21 @@ class CachingFrameworkGarbageCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTe
         * @test
         */
        public function executeCallsCollectGarbageOfConfiguredBackend() {
-               $cache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\StringFrontend', array(), array(), '', FALSE);
+               $cache = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class, array(), array(), '', FALSE);
                $cache->expects($this->any())->method('getIdentifier')->will($this->returnValue('cache'));
                $cache->expects($this->atLeastOnce())->method('collectGarbage');
                $mockCacheManager = new \TYPO3\CMS\Core\Cache\CacheManager();
                $mockCacheManager->registerCache($cache);
-               GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $mockCacheManager);
+               GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Cache\CacheManager::class, $mockCacheManager);
                $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] = array(
                        'cache' => array(
-                               'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\StringFrontend',
-                               'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\AbstractBackend',
+                               'frontend' => \TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class,
+                               'backend' => \TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class,
                        )
                );
                /** @var \TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask|\PHPUnit_Framework_MockObject_MockObject $subject */
-               $subject = $this->getMock('TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionTask', array('dummy'), array(), '', FALSE);
-               $subject->selectedBackends = array('TYPO3\\CMS\\Core\\Cache\\Backend\\AbstractBackend');
+               $subject = $this->getMock(\TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask::class, array('dummy'), array(), '', FALSE);
+               $subject->selectedBackends = array(\TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class);
                $subject->execute();
        }
 
@@ -68,21 +68,21 @@ class CachingFrameworkGarbageCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTe
         * @test
         */
        public function executeDoesNotCallCollectGarbageOfNotConfiguredBackend() {
-               $cache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\StringFrontend', array(), array(), '', FALSE);
+               $cache = $this->getMock(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class, array(), array(), '', FALSE);
                $cache->expects($this->any())->method('getIdentifier')->will($this->returnValue('cache'));
                $cache->expects($this->never())->method('collectGarbage');
                $mockCacheManager = new \TYPO3\CMS\Core\Cache\CacheManager();
                $mockCacheManager->registerCache($cache);
-               GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $mockCacheManager);
+               GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Cache\CacheManager::class, $mockCacheManager);
                $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] = array(
                        'cache' => array(
-                               'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\StringFrontend',
-                               'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\AbstractBackend',
+                               'frontend' => \TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class,
+                               'backend' => \TYPO3\CMS\Core\Cache\Backend\AbstractBackend::class,
                        )
                );
                /** @var \TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask|\PHPUnit_Framework_MockObject_MockObject $subject */
-               $subject = $this->getMock('TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionTask', array('dummy'), array(), '', FALSE);
-               $subject->selectedBackends = array('TYPO3\\CMS\\Core\\Cache\\Backend\\NullBackend');
+               $subject = $this->getMock(\TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask::class, array('dummy'), array(), '', FALSE);
+               $subject->selectedBackends = array(\TYPO3\CMS\Core\Cache\Backend\NullBackend::class);
                $subject->execute();
        }
 
index 9c917d7..83085bb 100644 (file)
@@ -11,83 +11,83 @@ $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['scheduler'
 // If sample tasks should be shown,
 // register information for the test and sleep tasks
 if (!empty($extConf['showSampleTasks'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Example\\TestTask'] = array(
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Example\TestTask::class] = array(
                'extension' => $_EXTKEY,
                'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:testTask.name',
                'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:testTask.description',
-               'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Example\\TestTaskAdditionalFieldProvider'
+               'additionalFields' => \TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider::class
        );
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Example\\SleepTask'] = array(
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Example\SleepTask::class] = array(
                'extension' => $_EXTKEY,
                'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:sleepTask.name',
                'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:sleepTask.description',
-               'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Example\\SleepTaskAdditionalFieldProvider'
+               'additionalFields' => \TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider::class
        );
 }
 
 // Add caching framework garbage collection task
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionTask'] = array(
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask::class] = array(
        'extension' => $_EXTKEY,
        'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:cachingFrameworkGarbageCollection.name',
        'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:cachingFrameworkGarbageCollection.description',
-       'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionAdditionalFieldProvider'
+       'additionalFields' => \TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionAdditionalFieldProvider::class
 );
 
 // Add task to index file in a storage
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\FileStorageIndexingTask'] = array(
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\FileStorageIndexingTask::class] = array(
        'extension' => $_EXTKEY,
        'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:fileStorageIndexing.name',
        'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:fileStorageIndexing.description',
-       'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\FileStorageIndexingAdditionalFieldProvider'
+       'additionalFields' => \TYPO3\CMS\Scheduler\Task\FileStorageIndexingAdditionalFieldProvider::class
 );
 
 // Add task for extracting metadata from files in a storage
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\FileStorageExtractionTask'] = array(
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\FileStorageExtractionTask::class] = array(
        'extension' => $_EXTKEY,
        'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:fileStorageExtraction.name',
        'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:fileStorageExtraction.description',
-       'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\FileStorageExtractionAdditionalFieldProvider'
+       'additionalFields' => \TYPO3\CMS\Scheduler\Task\FileStorageExtractionAdditionalFieldProvider::class
 
 );
 
 // Add recycler directory cleanup task. Windows is not supported
 // because "filectime" does not change after moving a file
 if (TYPO3_OS !== 'WIN') {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\RecyclerGarbageCollectionTask'] = array(
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionTask::class] = array(
                'extension' => $_EXTKEY,
                'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:recyclerGarbageCollection.name',
                'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:recyclerGarbageCollection.description',
-               'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\RecyclerGarbageCollectionAdditionalFieldProvider'
+               'additionalFields' => \TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionAdditionalFieldProvider::class
        );
 }
 
 // Add table garbage collection task
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask'] = array(
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class] = array(
        'extension' => $_EXTKEY,
        'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:tableGarbageCollection.name',
        'description' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:tableGarbageCollection.description',
-       'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionAdditionalFieldProvider'
+       'additionalFields' => \TYPO3\CMS\Scheduler\Task\TableGarbageCollectionAdditionalFieldProvider::class
 );
 
 // Initialize option array of table garbage collection task if not already done by some other extension or localconf.php
-if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options'] = array();
+if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options'])) {
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options'] = array();
 }
 
-if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables'] = array();
+if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'])) {
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'] = array();
 }
 
 // Register sys_log and sys_history table in table garbage collection task
-if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_log'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_log'] = array(
+if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['sys_log'])) {
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['sys_log'] = array(
                'dateField' => 'tstamp',
                'expirePeriod' => 180
        );
 }
 
-if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_history'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\TableGarbageCollectionTask']['options']['tables']['sys_history'] = array(
+if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['sys_history'])) {
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['sys_history'] = array(
                'dateField' => 'tstamp',
                'expirePeriod' => 30
        );
index 0a69357..bdcef68 100644 (file)
@@ -46,13 +46,13 @@ if (TYPO3_MODE === 'BE') {
                        ),
                        'lang' => array(
                                'type' => 'select',
-                               'itemsProcFunc' => 'TYPO3\\CMS\\Setup\\Controller\\SetupModuleController->renderLanguageSelect',
+                               'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderLanguageSelect',
                                'label' => 'LLL:EXT:setup/mod/locallang.xlf:language',
                                'csh' => 'language'
                        ),
                        'startModule' => array(
                                'type' => 'select',
-                               'itemsProcFunc' => 'TYPO3\\CMS\\Setup\\Controller\\SetupModuleController->renderStartModuleSelect',
+                               'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderStartModuleSelect',
                                'label' => 'LLL:EXT:setup/mod/locallang.xlf:startModule',
                                'csh' => 'startModule'
                        ),
index d5ff24c..e05c341 100644 (file)
@@ -74,7 +74,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
                                        \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf('Login-attempt from %s (%s), username \'%s\' not found!', $this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $this->login['uname']), 'Core', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
                                } else {
                                        if ($this->writeDevLog) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User found: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($user, array($this->db_user['userid_column'], $this->db_user['username_column'])), 'TYPO3\\CMS\\Sv\\AuthenticationService');
+                                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User found: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($user, array($this->db_user['userid_column'], $this->db_user['username_column'])), \TYPO3\CMS\Sv\AuthenticationService::class);
                                        }
                                }
                        } else {
@@ -111,7 +111,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
                                        \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf('Login-attempt from %s (%s), username \'%s\', password not accepted!', $this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $this->login['uname']), 'Core', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
                                }
                                if ($this->writeDevLog) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Password not accepted: ' . $this->login['uident'], 'TYPO3\\CMS\\Sv\\AuthenticationService', 2);
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Password not accepted: ' . $this->login['uident'], \TYPO3\CMS\Sv\AuthenticationService::class, 2);
                                }
                        }
                        // Checking the domain (lockToDomain)
@@ -155,7 +155,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
                        if (count($groups)) {
                                $list = implode(',', $groups);
                                if ($this->writeDevLog) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Get usergroups with id: ' . $list, 'TYPO3\\CMS\\Sv\\AuthenticationService');
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Get usergroups with id: ' . $list, \TYPO3\CMS\Sv\AuthenticationService::class);
                                }
                                $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . $this->authInfo['HTTP_HOST'] . '\')';
                                if (!$this->authInfo['showHiddenRecords']) {
@@ -170,7 +170,7 @@ class AuthenticationService extends \TYPO3\CMS\Sv\AbstractAuthenticationService
                                }
                        } else {
                                if ($this->writeDevLog) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('No usergroups found.', 'TYPO3\\CMS\\Sv\\AuthenticationService', 2);
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('No usergroups found.', \TYPO3\CMS\Sv\AuthenticationService::class, 2);
                                }
                        }
                } elseif ($this->mode == 'getGroupsBE') {
index 10323ac..601fe6f 100644 (file)
@@ -5,7 +5,7 @@ defined('TYPO3_MODE') or die();
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
        $_EXTKEY,
        'auth',
-       'TYPO3\\CMS\\Sv\\AuthenticationService',
+       \TYPO3\CMS\Sv\AuthenticationService::class,
        array(
                'title' => 'User authentication',
                'description' => 'Authentication with username/password.',
@@ -15,9 +15,9 @@ defined('TYPO3_MODE') or die();
                'quality' => 50,
                'os' => '',
                'exec' => '',
-               'className' => 'TYPO3\\CMS\\Sv\\AuthenticationService'
+               'className' => \TYPO3\CMS\Sv\AuthenticationService::class
        )
 );
 // Add hooks to the backend login form
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginFormHook'][$_EXTKEY] = 'TYPO3\\CMS\\Sv\\LoginFormHook->getLoginFormTag';
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginScriptHook'][$_EXTKEY] = 'TYPO3\\CMS\\Sv\\LoginFormHook->getLoginScripts';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginFormHook'][$_EXTKEY] = \TYPO3\CMS\Sv\LoginFormHook::class . '->getLoginFormTag';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginScriptHook'][$_EXTKEY] = \TYPO3\CMS\Sv\LoginFormHook::class . '->getLoginScripts';
index 336f216..db064f6 100644 (file)
@@ -6,6 +6,6 @@ if (TYPO3_MODE === 'BE') {
                'title' => 'LLL:EXT:sv/Resources/Private/Language/locallang.xlf:report_title',
                'description' => 'LLL:EXT:sv/Resources/Private/Language/locallang.xlf:report_description',
                'icon' => 'EXT:sv/Resources/Public/Images/service-reports.png',
-               'report' => 'TYPO3\\CMS\\Sv\\Report\\ServicesListReport'
+               'report' => \TYPO3\CMS\Sv\Report\ServicesListReport::class
        );
 }