[TASK] Make stateless Bootstrap methods static 75/55775/11
authorBenjamin Franzke <bfr@qbus.de>
Sat, 17 Feb 2018 15:00:58 +0000 (16:00 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 1 Mar 2018 13:32:30 +0000 (14:32 +0100)
Methods that do not use $this but mainly act as utility
may be used statically.
The previous non-static chainable behaviour is preserved
by returning static::$instance. (Invoking a static method
non statically does not trigger E_NOTICE or alike.)

The motivation for this change is to deprecate the
Bootstrap instanciated usage at some (later) point
in order to reduce global state.

The following methods are affected:
 * initializeLanguageObject
 * initializeBackendAuthentication
 * initializeBackendUser
 * initializeBackendRouter
 * loadExtTables
 * loadBaseTca
 * loadTypo3LoadedExtAndExtLocalconf
 * unsetReservedGlobalVariables
 * startOutputBuffering
 * disableCoreCache

Releases: master
Resolves: #83952
Change-Id: I59d3027c5d10326d7bab2ae02e6ff0eb836f23e4
Reviewed-on: https://review.typo3.org/55775
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
31 files changed:
typo3/sysext/backend/Classes/Command/ReferenceIndexUpdateCommand.php
typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php
typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php
typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php
typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php
typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php
typo3/sysext/core/Classes/Console/CommandApplication.php
typo3/sysext/core/Classes/Console/CommandRequestHandler.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
typo3/sysext/impexp/Classes/Command/ImportCommand.php
typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php
typo3/sysext/install/Classes/Controller/AbstractController.php
typo3/sysext/install/Classes/Controller/InstallerController.php
typo3/sysext/install/Classes/Controller/SettingsController.php
typo3/sysext/install/Classes/Service/ClearCacheService.php
typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php
typo3/sysext/lowlevel/Classes/Command/DeletedRecordsCommand.php
typo3/sysext/lowlevel/Classes/Command/FilesWithMultipleReferencesCommand.php
typo3/sysext/lowlevel/Classes/Command/LostFilesCommand.php
typo3/sysext/lowlevel/Classes/Command/MissingFilesCommand.php
typo3/sysext/lowlevel/Classes/Command/MissingRelationsCommand.php
typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php
typo3/sysext/lowlevel/Classes/Command/RteImagesCommand.php
typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php
typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php
typo3/sysext/workspaces/Classes/Command/WorkspaceVersionRecordsCommand.php
typo3/sysext/workspaces/Tests/Functional/ActionHandler/ActionHandlerTest.php
typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php

index b516e5e..f9fc7fe 100644 (file)
@@ -49,7 +49,7 @@ class ReferenceIndexUpdateCommand extends Command
      */
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $isTestOnly = $input->getOption('check');
         $isSilent = $output->getVerbosity() !== OutputInterface::VERBOSITY_QUIET;
index cccf3ce..8495c9d 100644 (file)
@@ -63,9 +63,8 @@ class BackendRouteInitialization implements MiddlewareInterface
                 . ' to use the TYPO3 API.', E_USER_DEPRECATED);
         }
 
-        Bootstrap::getInstance()
-            ->initializeBackendRouter()
-            ->loadExtTables();
+        Bootstrap::initializeBackendRouter();
+        Bootstrap::loadExtTables();
 
         // Add the route path to the request
         $request = $request->withAttribute('routePath', $pathToRoute);
index 926fe0d..2566d33 100644 (file)
@@ -53,11 +53,10 @@ class BackendUserAuthenticator implements MiddlewareInterface
     {
         $pathToRoute = $request->getAttribute('routePath', '/login');
 
-        Bootstrap::getInstance()
-            ->initializeBackendUser()
-            // @todo: once this logic is in this method, the redirect URL should be handled as response here
-            ->initializeBackendAuthentication($this->isLoggedInBackendUserRequired($pathToRoute))
-            ->initializeLanguageObject();
+        Bootstrap::initializeBackendUser();
+        // @todo: once this logic is in this method, the redirect URL should be handled as response here
+        Bootstrap::initializeBackendAuthentication($this->isLoggedInBackendUserRequired($pathToRoute));
+        Bootstrap::initializeLanguageObject();
 
         return $handler->handle($request);
     }
index 0c06968..0e54d0c 100644 (file)
@@ -50,7 +50,7 @@ class FormInlineAjaxControllerTest extends FunctionalTestCase
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Fixtures/tx_irretutorial_1ncsv_hotel.xml');
 
         $this->setUpBackendUserFromFixture(1);
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
 
         $this->subject = new FormInlineAjaxController();
     }
index 509231f..4970cb6 100644 (file)
@@ -58,7 +58,7 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
         $this->backendUser = $this->setUpBackendUserFromFixture(1);
         $this->backendUser->workspace = 0;
 
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
         $this->actionService = GeneralUtility::makeInstance(ActionService::class);
 
         $this->importDataSet(__DIR__ . '/Fixtures/pages.xml');
index 70d42be..5c12299 100644 (file)
@@ -35,7 +35,7 @@ class LocalizationRepositoryTest extends \TYPO3\TestingFramework\Core\Functional
         parent::setUp();
 
         $this->setUpBackendUserFromFixture(1);
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
 
         $this->importCSVDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/Fixtures/DefaultPagesAndContent.csv');
 
index 22ee47e..93d6a2c 100644 (file)
@@ -60,7 +60,7 @@ class CommandApplication implements ApplicationInterface
      */
     public function run(callable $execute = null)
     {
-        $handler = GeneralUtility::makeInstance(CommandRequestHandler::class, $this->bootstrap);
+        $handler = GeneralUtility::makeInstance(CommandRequestHandler::class);
         $handler->handleRequest(new ArgvInput());
 
         if ($execute !== null) {
index ba9ce3c..acc1662 100644 (file)
@@ -29,25 +29,16 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 class CommandRequestHandler implements RequestHandlerInterface
 {
     /**
-     * Instance of the current TYPO3 bootstrap
-     * @var Bootstrap
-     */
-    protected $bootstrap;
-
-    /**
      * Instance of the symfony application
      * @var Application
      */
     protected $application;
 
     /**
-     * Constructor handing over the bootstrap
-     *
-     * @param Bootstrap $bootstrap
+     * Constructor initializing the symfony application
      */
-    public function __construct(Bootstrap $bootstrap)
+    public function __construct()
     {
-        $this->bootstrap = $bootstrap;
         $this->application = new Application('TYPO3 CMS', TYPO3_version);
     }
 
@@ -60,11 +51,10 @@ class CommandRequestHandler implements RequestHandlerInterface
     {
         $output = new ConsoleOutput();
 
-        $this->bootstrap
-            ->loadExtTables()
-            // create the BE_USER object (not logged in yet)
-            ->initializeBackendUser(CommandLineUserAuthentication::class)
-            ->initializeLanguageObject();
+        Bootstrap::loadExtTables();
+        // create the BE_USER object (not logged in yet)
+        Bootstrap::initializeBackendUser(CommandLineUserAuthentication::class);
+        Bootstrap::initializeLanguageObject();
         // Make sure output is not buffered, so command-line output and interaction can take place
         ob_clean();
 
index d0d6509..7acbee8 100644 (file)
@@ -110,13 +110,13 @@ class Bootstrap
      * Prevent any unwanted output that may corrupt AJAX/compression.
      * This does not interfere with "die()" or "echo"+"exit()" messages!
      *
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function startOutputBuffering()
+    public static function startOutputBuffering()
     {
         ob_start();
-        return $this;
+        return static::$instance;
     }
 
     /**
@@ -337,13 +337,13 @@ class Bootstrap
      * Load ext_localconf of extensions
      *
      * @param bool $allowCaching
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function loadTypo3LoadedExtAndExtLocalconf($allowCaching = true)
+    public static function loadTypo3LoadedExtAndExtLocalconf($allowCaching = true)
     {
         ExtensionManagementUtility::loadExtLocalconf($allowCaching);
-        return $this;
+        return static::$instance;
     }
 
     /**
@@ -368,15 +368,15 @@ class Bootstrap
     /**
      * Set cache_core to null backend, effectively disabling eg. the cache for ext_localconf and PackageManager etc.
      *
-     * @return \TYPO3\CMS\Core\Core\Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function disableCoreCache()
+    public static function disableCoreCache()
     {
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['backend']
             = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class;
         unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['options']);
-        return $this;
+        return static::$instance;
     }
 
     /**
@@ -545,10 +545,10 @@ class Bootstrap
      * Unsetting reserved global variables:
      * Those are set in "ext:core/ext_tables.php" file:
      *
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function unsetReservedGlobalVariables()
+    public static function unsetReservedGlobalVariables()
     {
         unset($GLOBALS['PAGES_TYPES']);
         unset($GLOBALS['TCA']);
@@ -559,7 +559,7 @@ class Bootstrap
         unset($GLOBALS['TBE_MODULES_EXT']);
         unset($GLOBALS['TCA_DESCR']);
         unset($GLOBALS['LOCAL_LANG']);
-        return $this;
+        return static::$instance;
     }
 
     /**
@@ -568,13 +568,13 @@ class Bootstrap
      * This will mainly set up $TCA through extMgm API.
      *
      * @param bool $allowCaching True, if loading TCA from cache is allowed
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function loadBaseTca(bool $allowCaching = true): Bootstrap
+    public static function loadBaseTca(bool $allowCaching = true)
     {
         ExtensionManagementUtility::loadBaseTca($allowCaching);
-        return $this;
+        return static::$instance;
     }
 
     /**
@@ -584,14 +584,14 @@ class Bootstrap
      * or the according cache file if exists.
      *
      * @param bool $allowCaching True, if reading compiled ext_tables file from cache is allowed
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function loadExtTables(bool $allowCaching = true): Bootstrap
+    public static function loadExtTables(bool $allowCaching = true)
     {
         ExtensionManagementUtility::loadExtTables($allowCaching);
-        $this->runExtTablesPostProcessingHooks();
-        return $this;
+        static::runExtTablesPostProcessingHooks();
+        return static::$instance;
     }
 
     /**
@@ -599,7 +599,7 @@ class Bootstrap
      *
      * @throws \UnexpectedValueException
      */
-    protected function runExtTablesPostProcessingHooks()
+    protected static function runExtTablesPostProcessingHooks()
     {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'] ?? [] as $className) {
             /** @var $hookObject \TYPO3\CMS\Core\Database\TableConfigurationPostProcessingHookInterface */
@@ -618,10 +618,10 @@ class Bootstrap
      * Initialize the Routing for the TYPO3 Backend
      * Loads all routes registered inside all packages and stores them inside the Router
      *
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function initializeBackendRouter()
+    public static function initializeBackendRouter()
     {
         // See if the Routes.php from all active packages have been built together already
         $cacheIdentifier = 'BackendRoutesFromPackages_' . sha1((TYPO3_version . PATH_site . 'BackendRoutesFromPackages'));
@@ -669,17 +669,17 @@ class Bootstrap
             $route = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\Route::class, $path, $options);
             $router->addRoute($name, $route);
         }
-        return $this;
+        return static::$instance;
     }
 
     /**
      * Initialize backend user object in globals
      *
      * @param string $className usually \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class but can be used for CLI
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function initializeBackendUser($className = \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class)
+    public static function initializeBackendUser($className = \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class)
     {
         /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
         $backendUser = GeneralUtility::makeInstance($className);
@@ -687,7 +687,7 @@ class Bootstrap
         // might trigger code which relies on it. See: #45625
         $GLOBALS['BE_USER'] = $backendUser;
         $backendUser->start();
-        return $this;
+        return static::$instance;
     }
 
     /**
@@ -695,25 +695,25 @@ class Bootstrap
      *
      * @internal This is not a public API method, do not use in own extensions
      * @param bool $proceedIfNoUserIsLoggedIn if set to TRUE, no forced redirect to the login page will be done
-     * @return \TYPO3\CMS\Core\Core\Bootstrap
+     * @return Bootstrap|null
      */
-    public function initializeBackendAuthentication($proceedIfNoUserIsLoggedIn = false)
+    public static function initializeBackendAuthentication($proceedIfNoUserIsLoggedIn = false)
     {
         $GLOBALS['BE_USER']->backendCheckLogin($proceedIfNoUserIsLoggedIn);
-        return $this;
+        return static::$instance;
     }
 
     /**
      * Initialize language object
      *
-     * @return Bootstrap
+     * @return Bootstrap|null
      * @internal This is not a public API method, do not use in own extensions
      */
-    public function initializeLanguageObject()
+    public static function initializeLanguageObject()
     {
         /** @var $GLOBALS['LANG'] \TYPO3\CMS\Core\Localization\LanguageService */
         $GLOBALS['LANG'] = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\LanguageService::class);
         $GLOBALS['LANG']->init($GLOBALS['BE_USER']->uc['lang']);
-        return $this;
+        return static::$instance;
     }
 }
index f0f1937..bcbb03e 100644 (file)
@@ -87,7 +87,7 @@ abstract class AbstractDataHandlerActionTestCase extends FunctionalTestCase
         $this->backendUser->workspace = 0;
 
         $this->actionService = $this->getActionService();
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
     }
 
     protected function tearDown()
index e032444..a11455e 100644 (file)
@@ -421,9 +421,8 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface
     {
         $this->reloadOpcache();
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtLocalconf(false);
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-            ->loadBaseTca(false)
-            ->loadExtTables(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::loadBaseTca(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::loadExtTables(false);
     }
 
     /**
index a415d65..9f64161 100644 (file)
@@ -80,10 +80,9 @@ class BackendUserAuthenticator implements MiddlewareInterface
         // like $GLOBALS['LANG'] for labels in the language of the BE User, the router, and ext_tables.php for all modules
         // So things like Frontend Editing and Admin Panel can use this for generating links to the TYPO3 Backend.
         if ($GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication) {
-            Bootstrap::getInstance()
-                ->initializeLanguageObject()
-                ->initializeBackendRouter()
-                ->loadExtTables();
+            Bootstrap::initializeLanguageObject();
+            Bootstrap::initializeBackendRouter();
+            Bootstrap::loadExtTables();
             // Initialize admin panel since simulation settings are required here
             $GLOBALS['BE_USER']->initializeAdminPanel();
         }
index 1e38688..1e8cea4 100644 (file)
@@ -80,7 +80,7 @@ class ImportCommand extends Command
         $io = new SymfonyStyle($input, $output);
 
         // Ensure the _cli_ user is authenticated
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $pageId = (int)$input->getArgument('pageId');
 
index 3653ed5..a253719 100644 (file)
@@ -66,7 +66,7 @@ abstract class AbstractImportExportTestCase extends FunctionalTestCase
 
         $backendUser = $this->setUpBackendUserFromFixture(1);
         $backendUser->workspace = 0;
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
     }
 
     /**
index 16fc2bf..9821c1b 100644 (file)
@@ -56,10 +56,9 @@ class AbstractController
      */
     protected function loadExtLocalconfDatabaseAndExtTables()
     {
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-            ->loadTypo3LoadedExtAndExtLocalconf(false)
-            ->unsetReservedGlobalVariables()
-            ->loadBaseTca(false)
-            ->loadExtTables(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::loadTypo3LoadedExtAndExtLocalconf(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::unsetReservedGlobalVariables();
+        \TYPO3\CMS\Core\Core\Bootstrap::loadBaseTca(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::loadExtTables(false);
     }
 }
index d7b5898..323aeea 100644 (file)
@@ -1115,10 +1115,9 @@ For each website you need a TypoScript template on the main page of your website
      */
     protected function loadExtLocalconfDatabaseAndExtTables()
     {
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-            ->loadTypo3LoadedExtAndExtLocalconf(false)
-            ->unsetReservedGlobalVariables()
-            ->loadBaseTca(false)
-            ->loadExtTables(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::loadTypo3LoadedExtAndExtLocalconf(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::unsetReservedGlobalVariables();
+        \TYPO3\CMS\Core\Core\Bootstrap::loadBaseTca(false);
+        \TYPO3\CMS\Core\Core\Bootstrap::loadExtTables(false);
     }
 }
index 6715709..e92fae6 100644 (file)
@@ -323,7 +323,7 @@ class SettingsController extends AbstractController
     public function extensionConfigurationGetContentAction(ServerRequestInterface $request): ResponseInterface
     {
         // Extension configuration needs initialized $GLOBALS['LANG']
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
         $extensionConfigurationService = new ExtensionConfigurationService();
         $extensionsWithConfigurations = [];
         $activePackages = GeneralUtility::makeInstance(PackageManager::class)->getActivePackages();
index b48ca13..1235ea2 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Service;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -41,7 +42,7 @@ class ClearCacheService
         // Delete typo3temp/Cache
         GeneralUtility::flushDirectory(PATH_site . 'typo3temp/var/Cache', true, true);
 
-        $bootstrap = \TYPO3\CMS\Core\Core\Bootstrap::getInstance();
+        $bootstrap = Bootstrap::getInstance();
         $bootstrap
             ->initializeCachingFramework()
             ->initializePackageManagement(\TYPO3\CMS\Core\Package\PackageManager::class);
@@ -69,11 +70,10 @@ class ClearCacheService
         // From this point on, the code may fatal, if some broken extension is loaded.
 
         // Use bootstrap to load all ext_localconf and ext_tables
-        $bootstrap
-            ->loadTypo3LoadedExtAndExtLocalconf(false)
-            ->unsetReservedGlobalVariables()
-            ->loadBaseTca(false)
-            ->loadExtTables(false);
+        Bootstrap::loadTypo3LoadedExtAndExtLocalconf(false);
+        Bootstrap::unsetReservedGlobalVariables();
+        Bootstrap::loadBaseTca(false);
+        Bootstrap::loadExtTables(false);
 
         // The cache manager is already instantiated in the install tool
         // with some hacked settings to disable caching of extbase and fluid.
index bcda9b5..fc3f16e 100644 (file)
@@ -71,7 +71,7 @@ class CleanFlexFormsCommand extends Command
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index 3d6ddc4..99c947e 100644 (file)
@@ -71,7 +71,7 @@ class DeletedRecordsCommand extends Command
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index 0b4fc2b..a0acb38 100644 (file)
@@ -82,7 +82,7 @@ If you want to get more detailed information, use the --verbose option.')
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index ccda74e..5e263d8 100644 (file)
@@ -93,7 +93,7 @@ If you want to get more detailed information, use the --verbose option.')
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index b6338d8..ac6dd27 100644 (file)
@@ -82,7 +82,7 @@ If you want to get more detailed information, use the --verbose option.')
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index 59b2ccd..505cc3f 100644 (file)
@@ -97,7 +97,7 @@ If you want to get more detailed information, use the --verbose option.')
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index 07247e8..df8d732 100644 (file)
@@ -70,7 +70,7 @@ Manual repair suggestions:
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index ded59ce..365c716 100644 (file)
@@ -88,7 +88,7 @@ If you want to get more detailed information, use the --verbose option.')
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index 99bfb8e..eadb650 100644 (file)
@@ -41,7 +41,7 @@ abstract class AbstractRecycleTestCase extends \TYPO3\TestingFramework\Core\Func
     {
         parent::setUp();
         $this->importDataSet(__DIR__ . '/../Fixtures/Database/be_groups.xml');
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
+        \TYPO3\CMS\Core\Core\Bootstrap::initializeLanguageObject();
     }
 
     /**
index 7667ebc..917dfed 100644 (file)
@@ -76,7 +76,7 @@ Call it like this: typo3/sysext/core/bin/typo3 scheduler:run --task=13 -f')
     public function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $this->scheduler = GeneralUtility::makeInstance(Scheduler::class);
 
index 1f9aa32..aa9f887 100644 (file)
@@ -104,7 +104,7 @@ class WorkspaceVersionRecordsCommand extends Command
     protected function execute(InputInterface $input, OutputInterface $output)
     {
         // Make sure the _cli_ user is loaded
-        Bootstrap::getInstance()->initializeBackendAuthentication();
+        Bootstrap::initializeBackendAuthentication();
 
         $io = new SymfonyStyle($input, $output);
         $io->title($this->getDescription());
index 28a603a..e7fac63 100644 (file)
@@ -33,7 +33,7 @@ class ActionHandlerTest extends \TYPO3\TestingFramework\Core\Functional\Function
     {
         parent::setUp();
         $this->setUpBackendUserFromFixture(1);
-        \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
+        \TYPO3\CMS\Core\Core\Bootstrap::initializeLanguageObject();
     }
 
     /**
index 93d5b6b..5e0fb38 100644 (file)
@@ -35,7 +35,7 @@ class WorkspaceServiceTest extends FunctionalTestCase
     {
         parent::setUp();
         $this->setUpBackendUserFromFixture(1);
-        Bootstrap::getInstance()->initializeLanguageObject();
+        Bootstrap::initializeLanguageObject();
         $this->importDataSet(__DIR__ . '/../Fixtures/sys_workspace.xml');
     }