Project

General

Profile

Actions

Bug #44938

closed

LocalConfiguration extListArray adds keys if extension is uninstalled

Added by Jan-Erik Revsbech about 11 years ago. Updated over 5 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 #1

Updated by Gerrit Code Review about 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17811

Actions #2

Updated by Gerrit Code Review about 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17811

Actions #3

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17811

Actions #4

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17872

Actions #5

Updated by Christian Kuhn about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Oliver Hader about 11 years ago

  • Target version set to 2222
Actions #7

Updated by Oliver Hader about 11 years ago

  • Project changed from 2269 to TYPO3 Core
Actions #8

Updated by Oliver Hader about 11 years ago

  • Category set to Extension Manager
Actions #9

Updated by Oliver Hader about 11 years ago

  • Target version deleted (2222)
Actions #10

Updated by Thorsten Kahler over 6 years ago

  • Related to Bug #82304: ConfigurationManager::writeLocalConfiguration breaks log writer configuration added
Actions #11

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF