diff --git a/typo3/sysext/backend/Classes/Command/ReferenceIndexUpdateCommand.php b/typo3/sysext/backend/Classes/Command/ReferenceIndexUpdateCommand.php index b516e5e2bc48040d12ac6cc9708f17e2b6950385..f9fc7fe591b1e330fb02849ea02f8745c0b7f09f 100644 --- a/typo3/sysext/backend/Classes/Command/ReferenceIndexUpdateCommand.php +++ b/typo3/sysext/backend/Classes/Command/ReferenceIndexUpdateCommand.php @@ -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; diff --git a/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php b/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php index cccf3ce06640d71cfca6475bbc3aeb617cc721af..8495c9d42ec97b4f4f6688f0f16a1374379f70e3 100644 --- a/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php +++ b/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php @@ -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); diff --git a/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php index 926fe0d79887729153b8495cdca9785e00ea63b6..2566d33b672d67d73122cf63a56744ad7ccb45e0 100644 --- a/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php +++ b/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php @@ -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); } diff --git a/typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php b/typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php index 0c06968624c08998f488ccfd778be3b37fdc3ce6..0e54d0cc93ad9090e65652fec5c4c2fc30eebc87 100644 --- a/typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php +++ b/typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php @@ -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(); } diff --git a/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php b/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php index 509231f8ee4f2c27fb07c077e8c36a85a45bb5bb..4970cb65f6c633f4ad59acce9e34b26048b02c9d 100644 --- a/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php +++ b/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php @@ -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'); diff --git a/typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php b/typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php index 70d42be6e26e8e7165e7e46f837b39f716d86c7b..5c1229993662c1d53cb226e4c7c5ee9038c62833 100644 --- a/typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php +++ b/typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php @@ -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'); diff --git a/typo3/sysext/core/Classes/Console/CommandApplication.php b/typo3/sysext/core/Classes/Console/CommandApplication.php index 22ee47e1120af0d5f00f17c0dd2e7add2dd8ba35..93d6a2c0502e87c8f2d4485fca79d1456811b9b7 100644 --- a/typo3/sysext/core/Classes/Console/CommandApplication.php +++ b/typo3/sysext/core/Classes/Console/CommandApplication.php @@ -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) { diff --git a/typo3/sysext/core/Classes/Console/CommandRequestHandler.php b/typo3/sysext/core/Classes/Console/CommandRequestHandler.php index ba9ce3c7d15daf282a71f0104eedf8b69941e482..acc1662c0e1978e810c45ea88afc891228301939 100644 --- a/typo3/sysext/core/Classes/Console/CommandRequestHandler.php +++ b/typo3/sysext/core/Classes/Console/CommandRequestHandler.php @@ -28,12 +28,6 @@ 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 @@ -41,13 +35,10 @@ class CommandRequestHandler implements RequestHandlerInterface 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(); diff --git a/typo3/sysext/core/Classes/Core/Bootstrap.php b/typo3/sysext/core/Classes/Core/Bootstrap.php index d0d6509374350d3394cea9c22e061d9d1ab4e780..7acbee8a8c5f6345a2d8dd5a5d195f1bf3bbf5e2 100644 --- a/typo3/sysext/core/Classes/Core/Bootstrap.php +++ b/typo3/sysext/core/Classes/Core/Bootstrap.php @@ -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; } } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php index f0f1937614f44d23e66f1e2c8eb7956843c449b1..bcbb03e487604076acdbdcedea4c91d170f7049b 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php @@ -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() diff --git a/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php b/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php index e03244407ebe2dc3be7c242f0c753bb5e0410c6b..a11455e939c1b51f6219c77648921937fe76a84a 100644 --- a/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php +++ b/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php @@ -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); } /** diff --git a/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php index a415d65c1f4059f56e970d3c2fad3651c62a9438..9f64161c1871b480c4b6d458e8820deed3349bda 100644 --- a/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php +++ b/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php @@ -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(); } diff --git a/typo3/sysext/impexp/Classes/Command/ImportCommand.php b/typo3/sysext/impexp/Classes/Command/ImportCommand.php index 1e3868820a50b9edaddf6d4e351f9aecbe000ad2..1e8cea44c113c0882ad6faf477b0b0f0fcb60880 100644 --- a/typo3/sysext/impexp/Classes/Command/ImportCommand.php +++ b/typo3/sysext/impexp/Classes/Command/ImportCommand.php @@ -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'); diff --git a/typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php b/typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php index 3653ed59b3d16a7d3e89703bbb1e851a45266181..a2537190531d9092ca638cc87d08fa3fbad5ef7d 100644 --- a/typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php +++ b/typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php @@ -66,7 +66,7 @@ abstract class AbstractImportExportTestCase extends FunctionalTestCase $backendUser = $this->setUpBackendUserFromFixture(1); $backendUser->workspace = 0; - Bootstrap::getInstance()->initializeLanguageObject(); + Bootstrap::initializeLanguageObject(); } /** diff --git a/typo3/sysext/install/Classes/Controller/AbstractController.php b/typo3/sysext/install/Classes/Controller/AbstractController.php index 16fc2bfce7daba2351cdfacd04dc91c5469f6a09..9821c1b0364f493fecbbde9ab4b3d65134fda1ef 100644 --- a/typo3/sysext/install/Classes/Controller/AbstractController.php +++ b/typo3/sysext/install/Classes/Controller/AbstractController.php @@ -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); } } diff --git a/typo3/sysext/install/Classes/Controller/InstallerController.php b/typo3/sysext/install/Classes/Controller/InstallerController.php index d7b5898c15b66d574472234c933220dbe88f0cfc..323aeea2bc1854c624c91034900f11798d186e88 100644 --- a/typo3/sysext/install/Classes/Controller/InstallerController.php +++ b/typo3/sysext/install/Classes/Controller/InstallerController.php @@ -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); } } diff --git a/typo3/sysext/install/Classes/Controller/SettingsController.php b/typo3/sysext/install/Classes/Controller/SettingsController.php index 67157094a87342eec22c0c8740a6beb5c611ce2d..e92fae6bf5d023c2bb88e76207be6879c07c915c 100644 --- a/typo3/sysext/install/Classes/Controller/SettingsController.php +++ b/typo3/sysext/install/Classes/Controller/SettingsController.php @@ -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(); diff --git a/typo3/sysext/install/Classes/Service/ClearCacheService.php b/typo3/sysext/install/Classes/Service/ClearCacheService.php index b48ca133865e8f40051cdf851c3bedd69d7fab73..1235ea2f2aaf9890d086244a5fc8badda37d8fe2 100644 --- a/typo3/sysext/install/Classes/Service/ClearCacheService.php +++ b/typo3/sysext/install/Classes/Service/ClearCacheService.php @@ -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. diff --git a/typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php b/typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php index bcda9b54d1f109a031b3cf497971bc228f57c1de..fc3f16e3f688f12cfeee9b2721c8ac32d1995bef 100644 --- a/typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/CleanFlexFormsCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/DeletedRecordsCommand.php b/typo3/sysext/lowlevel/Classes/Command/DeletedRecordsCommand.php index 3d6ddc4ef6a5ebf5d5299371b55b3b100fd739be..99c947e2e3ba59eb0e2459fe5f0aa499f5d528ba 100644 --- a/typo3/sysext/lowlevel/Classes/Command/DeletedRecordsCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/DeletedRecordsCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/FilesWithMultipleReferencesCommand.php b/typo3/sysext/lowlevel/Classes/Command/FilesWithMultipleReferencesCommand.php index 0b4fc2b3410df3006ff60e3a554fe1e14bc42e0b..a0acb386a560ccffd097ef10a59b7a13abf4b6a1 100644 --- a/typo3/sysext/lowlevel/Classes/Command/FilesWithMultipleReferencesCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/FilesWithMultipleReferencesCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/LostFilesCommand.php b/typo3/sysext/lowlevel/Classes/Command/LostFilesCommand.php index ccda74e119a31ae8d0868ff408d6f0300847a9d2..5e263d8cd0ee4de019d2e2fc105e63c6d6d38bd2 100644 --- a/typo3/sysext/lowlevel/Classes/Command/LostFilesCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/LostFilesCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/MissingFilesCommand.php b/typo3/sysext/lowlevel/Classes/Command/MissingFilesCommand.php index b6338d826f242a5b6789bc44acc37435aef81c56..ac6dd2736061d6dba8c147b212663d4b0a935dec 100644 --- a/typo3/sysext/lowlevel/Classes/Command/MissingFilesCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/MissingFilesCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/MissingRelationsCommand.php b/typo3/sysext/lowlevel/Classes/Command/MissingRelationsCommand.php index 59b2ccd39d618dd82d5059aa40810f3b6474483d..505cc3f4a1e55e11763901f54bf36e64208aff6a 100644 --- a/typo3/sysext/lowlevel/Classes/Command/MissingRelationsCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/MissingRelationsCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php b/typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php index 07247e8022a86787962430b0304976c4ce8575d6..df8d732829df6c00ba78c9df4ddc5ab8c7317cf8 100644 --- a/typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php @@ -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()); diff --git a/typo3/sysext/lowlevel/Classes/Command/RteImagesCommand.php b/typo3/sysext/lowlevel/Classes/Command/RteImagesCommand.php index ded59ced13eef06c3583eb28ac9bf7169628db63..365c716322322e7d478dfd7bce72350ce0117af3 100644 --- a/typo3/sysext/lowlevel/Classes/Command/RteImagesCommand.php +++ b/typo3/sysext/lowlevel/Classes/Command/RteImagesCommand.php @@ -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()); diff --git a/typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php b/typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php index 99bfb8e59be3b1f9481aa5742799cdc38ad14470..eadb6507d606fa1ac1561f5a2c86921e8089c721 100644 --- a/typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php +++ b/typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php @@ -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(); } /** diff --git a/typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php b/typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php index 7667ebc1a469d920794fb303641d20e274e0e05d..917dfed0217a130451ed3e7e8b9c5e11505c9216 100644 --- a/typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php +++ b/typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php @@ -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); diff --git a/typo3/sysext/workspaces/Classes/Command/WorkspaceVersionRecordsCommand.php b/typo3/sysext/workspaces/Classes/Command/WorkspaceVersionRecordsCommand.php index 1f9aa32ec5610d1083fe4257781fc1f064dc31ca..aa9f887f4a8a9a1b03c1ac715da8a166e3f87f78 100644 --- a/typo3/sysext/workspaces/Classes/Command/WorkspaceVersionRecordsCommand.php +++ b/typo3/sysext/workspaces/Classes/Command/WorkspaceVersionRecordsCommand.php @@ -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()); diff --git a/typo3/sysext/workspaces/Tests/Functional/ActionHandler/ActionHandlerTest.php b/typo3/sysext/workspaces/Tests/Functional/ActionHandler/ActionHandlerTest.php index 28a603a1f188c7af45493b21f0723fe8473fdef9..e7fac63dfec40b025166e7e563761a45c38f9a25 100644 --- a/typo3/sysext/workspaces/Tests/Functional/ActionHandler/ActionHandlerTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/ActionHandler/ActionHandlerTest.php @@ -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(); } /** diff --git a/typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php b/typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php index 93d5b6b50dad8aa17f98ed57266ceca3b8b72562..5e0fb38ce6df31f47d494f0cb8502ff5b65a9ca3 100644 --- a/typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php @@ -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'); }