Project

General

Profile

Actions

Bug #105554

open

Enable Extbase to be used in console commands

Added by Lina Wolf about 19 hours ago. Updated about 19 hours 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.

Actions #1

Updated by Benjamin Franzke about 19 hours ago

  • Description updated (diff)
Actions #2

Updated by Benjamin Franzke about 19 hours ago

  • Status changed from New to Accepted
Actions

Also available in: Atom PDF