[TASK] Deprecate \TYPO3\CMS\Core\Core\Bootstrap::loadExtensionTables 18/51918/3
authorNicole Cordes <typo3@cordes.co>
Wed, 1 Mar 2017 12:17:37 +0000 (13:17 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 1 Mar 2017 13:19:11 +0000 (14:19 +0100)
With the patch https://review.typo3.org/51892 we have introduced single
functions to handle loading of information correctly. We can now remove
the wrapper function and call the new ones instead.

Resolves: #80079
Releases: master
Change-Id: I0d61f0d5760ae3c61fa96dc16329365d5f4182a5
Reviewed-on: https://review.typo3.org/51918
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
components/testing_framework/Classes/Core/Testbase.php
typo3/sysext/backend/Classes/Console/CliRequestHandler.php
typo3/sysext/backend/Classes/Http/AjaxRequestHandler.php
typo3/sysext/backend/Classes/Http/BackendModuleRequestHandler.php
typo3/sysext/backend/Classes/Http/RequestHandler.php
typo3/sysext/core/Classes/Console/CommandRequestHandler.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-80079-DeprecatedBootstraploadExtensionTables.rst [new file with mode: 0644]
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/install/Classes/Controller/Action/AbstractAction.php
typo3/sysext/install/Classes/Service/ClearCacheService.php

index 7e6310f..9917e89 100644 (file)
@@ -569,7 +569,7 @@ class Testbase
      */
     public function loadExtensionTables()
     {
-        Bootstrap::getInstance()->loadExtensionTables();
+        Bootstrap::getInstance()->loadBaseTca()->loadExtTables();
     }
 
     /**
index f8ca83c..6218dcf 100644 (file)
@@ -100,7 +100,8 @@ class CliRequestHandler implements RequestHandlerInterface
     protected function boot()
     {
         $this->bootstrap
-            ->loadExtensionTables()
+            ->loadBaseTca()
+            ->loadExtTables()
             ->initializeBackendUser(CommandLineUserAuthentication::class);
 
         // Checks for a user _CLI_, if non exists, will create one
index c92491e..1cf008a 100644 (file)
@@ -134,7 +134,8 @@ class AjaxRequestHandler implements RequestHandlerInterface
             ->checkBackendIpOrDie()
             ->checkSslBackendAndRedirectIfNeeded()
             ->initializeBackendRouter()
-            ->loadExtensionTables()
+            ->loadBaseTca()
+            ->loadExtTables()
             ->initializeBackendUser()
             ->initializeBackendAuthentication($proceedIfNoUserIsLoggedIn)
             ->initializeLanguageObject()
index d04c39f..809c1c7 100644 (file)
@@ -100,7 +100,8 @@ class BackendModuleRequestHandler implements RequestHandlerInterface
             ->checkBackendIpOrDie()
             ->checkSslBackendAndRedirectIfNeeded()
             ->initializeBackendRouter()
-            ->loadExtensionTables()
+            ->loadBaseTca()
+            ->loadExtTables()
             ->initializeBackendUser()
             ->initializeBackendAuthentication()
             ->initializeLanguageObject()
index 2508f5c..0381794 100644 (file)
@@ -91,7 +91,8 @@ class RequestHandler implements RequestHandlerInterface
             ->checkBackendIpOrDie()
             ->checkSslBackendAndRedirectIfNeeded()
             ->initializeBackendRouter()
-            ->loadExtensionTables(true)
+            ->loadBaseTca(true)
+            ->loadExtTables(true)
             ->initializeBackendUser()
             ->initializeBackendAuthentication($proceedIfNoUserIsLoggedIn)
             ->initializeLanguageObject()
index 1295db3..d3eb7a4 100644 (file)
@@ -62,7 +62,8 @@ class CommandRequestHandler implements RequestHandlerInterface
         $output = new ConsoleOutput();
 
         $this->bootstrap
-            ->loadExtensionTables()
+            ->loadBaseTca()
+            ->loadExtTables()
             // create the BE_USER object (not logged in yet)
             ->initializeBackendUser(CommandLineUserAuthentication::class)
             ->initializeLanguageObject()
index 8ebea8d..92e5b25 100644 (file)
@@ -911,9 +911,11 @@ class Bootstrap
      * @param bool $allowCaching True, if reading compiled ext_tables file from cache is allowed
      * @return Bootstrap
      * @internal This is not a public API method, do not use in own extensions
+     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
      */
     public function loadExtensionTables($allowCaching = true)
     {
+        GeneralUtility::logDeprecatedFunction();
         $this->loadBaseTca($allowCaching)->loadExtTables($allowCaching);
         return $this;
     }
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80079-DeprecatedBootstraploadExtensionTables.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80079-DeprecatedBootstraploadExtensionTables.rst
new file mode 100644 (file)
index 0000000..6f9f25b
--- /dev/null
@@ -0,0 +1,35 @@
+.. include:: ../../Includes.txt
+
+======================================================================
+Deprecation: #80079 - Deprecated method Bootstrap::loadExtensionTables
+======================================================================
+
+See :issue:`80079`
+
+Description
+===========
+
+The internal method :php:`TYPO3\CMS\Core\Core\Bootstrap::loadExtensionTables()` has been deprecated and should not be used any longer.
+
+
+Impact
+======
+
+Calling the deprecated :php:`Bootstrap::loadExtensionTables()` method will trigger a deprecation log entry.
+
+
+Affected Installations
+======================
+
+Any installation using the mentioned method :php:`Bootstrap::loadExtensionTables()`.
+Please note that this method is marked as internal and should not be called at all from outside the TYPO3 core.
+
+
+Migration
+=========
+
+If you need to call the internal Bootstrap method, you can use `Bootstrap::loadBaseTca()` and `Bootstrap::loadExtTables()` now.
+Please note that both methods are marked as internal and don't belong to public TYPO3 core API.
+This means that the methods can be adjusted anytime by the core itself.
+
+.. index:: Backend
index ec665cf..6ab6a03 100644 (file)
@@ -452,7 +452,9 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface
     {
         $this->reloadOpcache();
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtLocalconf(false);
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadExtensionTables(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
+            ->loadBaseTca(false)
+            ->loadExtTables(false);
     }
 
     /**
index 2e75b8b..63390e6 100644 (file)
@@ -203,7 +203,8 @@ abstract class AbstractAction implements ActionInterface
             ->defineLoggingAndExceptionConstants()
             ->unsetReservedGlobalVariables()
             ->initializeTypo3DbGlobal()
-            ->loadExtensionTables(false);
+            ->loadBaseTca(false)
+            ->loadExtTables(false);
     }
 
     /**
index 0be3c7b..77c47f4 100644 (file)
@@ -76,7 +76,8 @@ class ClearCacheService
             ->defineLoggingAndExceptionConstants()
             ->unsetReservedGlobalVariables()
             ->initializeTypo3DbGlobal()
-            ->loadExtensionTables(false);
+            ->loadBaseTca(false)
+            ->loadExtTables(false);
 
         // The cache manager is already instantiated in the install tool
         // with some hacked settings to disable caching of extbase and fluid.