Project

General

Profile

Actions

Bug #44938

closed

LocalConfiguration extListArray adds keys if extension is uninstalled

Added by Jan-Erik Revsbech almost 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Extension Manager
Target version:
-
Start date:
2013-01-29
Due date:
% Done:

100%

Estimated time:
1.00 h
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There is a minor 'glitch' when unloading some extension: The loaded extension list is an array since 6.0 (which is great). When writing out the array to LocalConfiguration, keys are numbered and array keys are always written, if the keys are not numbered without "leap". See ArrayUtility::arrayExport() for details (and the unit tests, the method has high code-coverage). Failure case: if unloading some extension that is in the middle of the array, obviously, some 'leap' is created in the numbered array key list of 'extList', because, well the extension is removed from the array. Therefor, the keys are after that written to LocalConfiguration, because there is a leap. It would be way better, if the array keys are left out, so you get:

»···»···'extListArray' => array(
»···»···»···'backend',
»···»···»···'core',
»···»···»···.......
»···»···),

instead of

»···»···'extListArray' => array(
»···»···»···0 -> 'backend',
»···»···»···1 -> 'core',
»···»···»···...

This was actually intended to be the case, but exportArray() is a bit too safe for that (which is intentional). Imho, the most easy solution would be to add some additional method to ArrayUtility to "clean up" array keys if they are numbered and have leaps. This method should again be covered by tests. The method should then be (probably) called in Core\Configuration\ConfigurationManager, just before exportArray for the ext.extListArray sub array. This way, we could get rid of the ugly numbers in LocalConfiguration for this numbered sub-array and have arrayExport as save as before.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #82304: ConfigurationManager::writeLocalConfiguration breaks log writer configurationClosed2017-09-05

Actions
Actions

Also available in: Atom PDF