[!!!][TASK] Remove deprecated code from TYPO3\CMS\Info\Controller\TranslationStatusCo... 80/59380/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 8 Jan 2019 20:21:31 +0000 (21:21 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 9 Jan 2019 18:42:30 +0000 (19:42 +0100)
Resolves: #87374
Releases: master
Change-Id: I16e1f37d9bb402068d921cd7bbafd3716b264bfc
Reviewed-on: https://review.typo3.org/59380
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst
typo3/sysext/info/Classes/Controller/TranslationStatusController.php

index ace600d..6a8b1bf 100644 (file)
@@ -399,6 +399,8 @@ The following PHP class methods that have been previously deprecated for v9 have
 * :php:`TYPO3\CMS\Impexp\Controller\ImportExportController->handleExternalFunctionValue()`
 * :php:`TYPO3\CMS\Impexp\Controller\ImportExportController->menuConfig()`
 * :php:`TYPO3\CMS\Impexp\Controller\ImportExportController->mergeExternalItems()`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->checkExtObj()`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->getSystemLanguages()`
 * :php:`TYPO3\CMS\Install\Service\CoreVersionService->getDownloadBaseUrl()`
 * :php:`TYPO3\CMS\Install\Service\CoreVersionService->isYoungerPatchDevelopmentReleaseAvailable()`
 * :php:`TYPO3\CMS\Install\Service\CoreVersionService->getYoungestPatchDevelopmentRelease()`
@@ -538,6 +540,11 @@ The following public class properties have been dropped:
 * :php:`TYPO3\CMS\Impexp\Export->maxExportSize`
 * :php:`TYPO3\CMS\IndexedSearch\Lexer->csObj`
 * :php:`TYPO3\CMS\IndexedSearch\Indexer->csObj`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->extClassConf`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->extObj`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->function_key`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->localLangFile`
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->pObj`
 * :php:`TYPO3\CMS\Extbase\Reflection\ClassSchema->addProperty`
 * :php:`TYPO3\CMS\Extbase\Reflection\ClassSchema->setModelType`
 * :php:`TYPO3\CMS\Extbase\Reflection\ClassSchema->getModelType`
@@ -667,6 +674,11 @@ The following class methods have changed visibility:
 * :php:`TYPO3\CMS\Impexp\Controller\ImportExportController->makeAdvancedOptionsForm()` changed from public to protected
 * :php:`TYPO3\CMS\Impexp\Controller\ImportExportController->makeConfigurationForm()` changed from public to protected
 * :php:`TYPO3\CMS\Impexp\Controller\ImportExportController->makeSaveForm()` changed from public to protected
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->extObjContent()` changed from public to protected
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->getContentElementCount()` changed from public to protected
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->getLangStatus()` changed from public to protected
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->renderL10nTable()` changed from public to protected
+* :php:`TYPO3\CMS\Info\Controller\TranslationStatusController->modMenu()` changed from public to protected
 * :php:`TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport->extObjContent()` changed from public to protected
 * :php:`TYPO3\CMS\Recordlist\Controller\RecordListController->init()` changed from public to protected
 * :php:`TYPO3\CMS\Recordlist\Controller\RecordListController->menuConfig()` changed from public to protected
index 6884da4..9c5b3e8 100644 (file)
@@ -18,8 +18,6 @@ use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Tree\View\PageTreeView;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
-use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
 use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
@@ -38,30 +36,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  */
 class TranslationStatusController
 {
-    use PublicPropertyDeprecationTrait;
-    use PublicMethodDeprecationTrait;
-
-    /**
-     * @var array
-     */
-    private $deprecatedPublicProperties = [
-        'pObj' => 'Using TranslationStatusController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
-        'function_key' => 'Using TranslationStatusController::function_key$ is deprecated, property will be removed in TYPO3 v10.0.',
-        'extClassConf' => 'Using TranslationStatusController::$extClassConf is deprecated, property will be removed in TYPO3 v10.0.',
-        'localLangFile' => 'Using TranslationStatusController::$localLangFile is deprecated, property will be removed in TYPO3 v10.0.',
-        'extObj' => 'Using TranslationStatusController::$extObj is deprecated, property will be removed in TYPO3 v10.0.',
-    ];
-
-    /**
-     * @var array
-     */
-    private $deprecatedPublicMethods = [
-        'getContentElementCount' => 'Using TranslationStatusController::getContentElementCount() is deprecated and will not be possible anymore in TYPO3 v10.0.',
-        'getLangStatus' => 'Using TranslationStatusController::getLangStatus() is deprecated and will not be possible anymore in TYPO3 v10.0.',
-        'renderL10nTable' => 'Using TranslationStatusController::renderL10nTable() is deprecated and will not be possible anymore in TYPO3 v10.0.',
-        'modMenu' => 'Using TranslationStatusController::modMenu() is deprecated and will not be possible anymore in TYPO3 v10.0.',
-        'extObjContent' => 'Using TranslationStatusController::extObjContent() is deprecated, method will be removed in TYPO3 v10.0.',
-    ];
 
     /**
      * @var IconFactory
@@ -84,26 +58,6 @@ class TranslationStatusController
     protected $id;
 
     /**
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected $extObj;
-
-    /**
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected $localLangFile = '';
-
-    /**
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected $extClassConf;
-
-    /**
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected $function_key = '';
-
-    /**
      * Init, called from parent object
      *
      * @param InfoModuleController $pObj A reference to the parent (calling) object
@@ -114,11 +68,7 @@ class TranslationStatusController
         $this->id = (int)GeneralUtility::_GP('id');
         $this->initializeSiteLanguages();
         $this->pObj = $pObj;
-        // Local lang:
-        if (!empty($this->localLangFile)) {
-            // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-            $this->getLanguageService()->includeLLFile($this->localLangFile);
-        }
+
         // Setting MOD_MENU items as we need them for logging:
         $this->pObj->MOD_MENU = array_merge($this->pObj->MOD_MENU, $this->modMenu());
     }
@@ -431,37 +381,6 @@ class TranslationStatusController
     }
 
     /**
-     * Selects all system languages (from sys_language)
-     *
-     * @return array System language records in an array.
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0
-     */
-    public function getSystemLanguages()
-    {
-        trigger_error('This method will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
-        if (!$this->getBackendUser()->isAdmin() && $this->getBackendUser()->groupData['allowed_languages'] !== '') {
-            $allowed_languages = array_flip(explode(',', $this->getBackendUser()->groupData['allowed_languages']));
-        }
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getQueryBuilderForTable('sys_language')
-            ->select('*')
-            ->from('sys_language')
-            ->orderBy('sorting');
-        $res = $queryBuilder->execute();
-        $outputArray = [];
-        if (is_array($allowed_languages) && !empty($allowed_languages)) {
-            while ($output = $res->fetch()) {
-                if (isset($allowed_languages[$output['uid']])) {
-                    $outputArray[] = $output;
-                }
-            }
-        } else {
-            $outputArray = $res->fetchAll();
-        }
-        return $outputArray;
-    }
-
-    /**
      * Get an alternative language record for a specific page / language
      *
      * @param int $pageId Page ID to look up for.
@@ -551,33 +470,6 @@ class TranslationStatusController
     }
 
     /**
-     * Called from InfoModuleController until deprecation removal in TYPO3 v10.0
-     *
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    public function checkExtObj()
-    {
-        if (is_array($this->extClassConf) && $this->extClassConf['name']) {
-            $this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);
-            $this->extObj->init($this->pObj, $this->extClassConf);
-            // Re-write:
-            $this->pObj->MOD_SETTINGS = BackendUtility::getModuleData($this->pObj->MOD_MENU, GeneralUtility::_GP('SET'), 'web_info');
-        }
-    }
-
-    /**
-     * Calls the main function inside ANOTHER sub-submodule which might exist.
-     *
-     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
-     */
-    protected function extObjContent()
-    {
-        if (is_object($this->extObj)) {
-            return $this->extObj->main();
-        }
-    }
-
-    /**
      * @return LanguageService
      */
     protected function getLanguageService(): LanguageService