Project

General

Profile

Actions

Bug #98081

closed

ExtensionConfiguration API

Added by Katharina Strasser almost 2 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-08-05
Due date:
% Done:

0%

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

Description

Hello,

the ExtensionConfiguration is not written correctly in v11 when using the API.

If I use this example

$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
$extensionConfiguration->set('myext', 'myvar', 'myvalue');

The result in the LocalConfiguration is wrong and even the installtool stops working.
The result looks like:
...
'EXTENSIONS' => [
        'myext' => 'myvar'
],
...

This however works as intended

$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['myext']['myvar'] = 'myvalue';
$extensionConfiguration->setAll($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']);

The result looks like:
...
'EXTENSIONS' => [
        'myext' => [
                'myvar' => 'myvalue'
        ],
],
...

Actions

Also available in: Atom PDF