Bug #44938
closedLocalConfiguration extListArray adds keys if extension is uninstalled
100%
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.
Updated by Gerrit Code Review almost 12 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
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17811
Updated by Gerrit Code Review almost 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17811
Updated by Gerrit Code Review almost 12 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
Updated by Christian Kuhn over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Updated by Oliver Hader over 11 years ago
- Project changed from 2269 to TYPO3 Core
Updated by Thorsten Kahler about 7 years ago
- Related to Bug #82304: ConfigurationManager::writeLocalConfiguration breaks log writer configuration added