From b548e016ff22edf7c3b1eaf582dff63fcc5b1c6c Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Wed, 4 Oct 2017 12:31:15 +0200
Subject: [PATCH] [!!!][TASK] Remove deprecated
 ensureClassLoadingInformationExists()

Change-Id: I0f83233c25e73cfe6194d005cde320542e65464f
Resolves: #82674
Related: #80700
Releases: master
Reviewed-on: https://review.typo3.org/54283
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
---
 typo3/sysext/core/Classes/Core/Bootstrap.php  | 20 -------------------
 .../Classes/Core/ClassLoadingInformation.php  |  2 +-
 ...g-80700-DeprecatedFunctionalityRemoved.rst |  1 +
 .../Classes/Controller/AbstractController.php |  1 -
 .../Controller/InstallerController.php        |  1 -
 .../Php/MethodCallMatcher.php                 |  7 +++++++
 6 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/typo3/sysext/core/Classes/Core/Bootstrap.php b/typo3/sysext/core/Classes/Core/Bootstrap.php
index 2244b26f2188..6d1f401c6595 100644
--- a/typo3/sysext/core/Classes/Core/Bootstrap.php
+++ b/typo3/sysext/core/Classes/Core/Bootstrap.php
@@ -404,9 +404,6 @@ class Bootstrap
             ->setDefaultTimezone()
             ->initializeL10nLocales()
             ->setMemoryLimit();
-        if ($allowCaching) {
-            $this->ensureClassLoadingInformationExists();
-        }
         return $this;
     }
 
@@ -433,23 +430,6 @@ class Bootstrap
         return $this;
     }
 
-    /**
-     * Writes class loading information if not yet present
-     *
-     * @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. Use the Install Tool to dump autoload information.
-     */
-    public function ensureClassLoadingInformationExists()
-    {
-        if (!self::$usesComposerClassLoading && !ClassLoadingInformation::isClassLoadingInformationAvailable()) {
-            GeneralUtility::logDeprecatedFunction();
-            ClassLoadingInformation::dumpClassLoadingInformation();
-            ClassLoadingInformation::registerClassLoadingInformation();
-        }
-        return $this;
-    }
-
     /**
      * Activates a package during runtime. This is used in AdditionalConfiguration.php
      * to enable extensions under conditions.
diff --git a/typo3/sysext/core/Classes/Core/ClassLoadingInformation.php b/typo3/sysext/core/Classes/Core/ClassLoadingInformation.php
index b1e97d92937b..dbdba9768aa1 100644
--- a/typo3/sysext/core/Classes/Core/ClassLoadingInformation.php
+++ b/typo3/sysext/core/Classes/Core/ClassLoadingInformation.php
@@ -63,7 +63,7 @@ class ClassLoadingInformation
      */
     public static function isClassLoadingInformationAvailable()
     {
-        return !self::isTestingContext() && file_exists(self::getClassLoadingInformationDirectory() . self::AUTOLOAD_CLASSMAP_FILENAME);
+        return file_exists(self::getClassLoadingInformationDirectory() . self::AUTOLOAD_CLASSMAP_FILENAME);
     }
 
     /**
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst
index ebe5ca5ab4e5..d476af0d1344 100644
--- a/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst
+++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst
@@ -152,6 +152,7 @@ The following PHP class methods that have been previously deprecated for v8 have
 * TYPO3\CMS\Core\Charset\CharsetConverter->utf8_strrpos()
 * TYPO3\CMS\Core\Charset\CharsetConverter->utf8_strtrunc()
 * TYPO3\CMS\Core\Charset\CharsetConverter->utf8_substr()
+* TYPO3\CMS\Core\Core\Bootstrap->ensureClassLoadingInformationExists()
 * TYPO3\CMS\Core\Core\Bootstrap->loadExtensionTables()
 * TYPO3\CMS\Core\Database\RelationHandler->readyForInterface()
 * TYPO3\CMS\Core\Database\QueryView->tableWrap()
diff --git a/typo3/sysext/install/Classes/Controller/AbstractController.php b/typo3/sysext/install/Classes/Controller/AbstractController.php
index 0567b5880f71..aa0b731d00f5 100644
--- a/typo3/sysext/install/Classes/Controller/AbstractController.php
+++ b/typo3/sysext/install/Classes/Controller/AbstractController.php
@@ -57,7 +57,6 @@ class AbstractController
     protected function loadExtLocalconfDatabaseAndExtTables()
     {
         \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-            ->ensureClassLoadingInformationExists()
             ->loadTypo3LoadedExtAndExtLocalconf(false)
             ->unsetReservedGlobalVariables()
             ->loadBaseTca(false)
diff --git a/typo3/sysext/install/Classes/Controller/InstallerController.php b/typo3/sysext/install/Classes/Controller/InstallerController.php
index 88be7a75f109..c6457c54b2be 100644
--- a/typo3/sysext/install/Classes/Controller/InstallerController.php
+++ b/typo3/sysext/install/Classes/Controller/InstallerController.php
@@ -1117,7 +1117,6 @@ For each website you need a TypoScript template on the main page of your website
     protected function loadExtLocalconfDatabaseAndExtTables()
     {
         \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-            ->ensureClassLoadingInformationExists()
             ->loadTypo3LoadedExtAndExtLocalconf(false)
             ->unsetReservedGlobalVariables()
             ->loadBaseTca(false)
diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
index 8e2170f9b2ad..5d8a5c4c63fb 100644
--- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
+++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php
@@ -1254,4 +1254,11 @@ return [
             'Breaking-82572-RDCTFunctionalityRemoved.rst',
         ],
     ],
+    'TYPO3\CMS\Core\Core\Bootstrap->ensureClassLoadingInformationExists' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Breaking-80700-DeprecatedFunctionalityRemoved.rst',
+        ],
+    ],
 ];
-- 
GitLab