Project

General

Profile

Actions

Bug #105554

open

Enable Extbase to be used in console commands

Added by Lina Wolf 14 days ago. Updated 14 days ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
CLI
Target version:
-
Start date:
2024-11-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There are valid reasons to use components of Extbase such as Repositories inside a CLI.

Currently you have to employ a workaround like

Bootstrap::initializeBackendAuthentication();
$configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class);
$configurationManager->setRequest(
    (new ServerRequest())->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_BE)
);

And make sure that your Exbase classes are not injected but retrieved with GU:makeInstance.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #105616: Extbase repository call from command leads to: ConfigurationManager has not been initialized properlyClosed2024-11-17

Actions
Actions

Also available in: Atom PDF