[FEATURE] Install tool: Remove obsolete keys from LocalConfiguration 53/21553/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 20 Jun 2013 21:59:11 +0000 (23:59 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 21 Jun 2013 19:54:53 +0000 (21:54 +0200)
Some configuration settings are obsolete, but they have never been
actively removed from LocalConfiguration. The patch introduces a
list of obsolete configuration options (like SYS/extCache) to the
install tool step controller and silently removes those settings
from LocalConfiguration to keep it clean. This also obsoletes
some deprecation code within core bootstrap.

Change-Id: Id422801f5bbedc0f444a0d905bdbb7d736fd82e8
Resolves: #49299
Related: #49162
Releases: 6.2
Reviewed-on: https://review.typo3.org/21553
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Configuration/ConfigurationManager.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php
typo3/sysext/install/Classes/Controller/StepController.php
typo3/sysext/install/Classes/Controller/ToolController.php

index 96067e6..7333f4d 100644 (file)
@@ -234,6 +234,26 @@ class ConfigurationManager {
        }
 
        /**
+        * Remove keys from LocalConfiguration
+        *
+        * @param array $keys Array with key paths to remove from LocalConfiguration
+        * @return boolean TRUE if something was removed
+        */
+       public function removeLocalConfigurationKeysByPath(array $keys) {
+               $result = FALSE;
+               $localConfiguration = $this->getLocalConfiguration();
+               foreach ($keys as $path) {
+                       // Remove key if path is within LocalConfiguration
+                       if (Utility\ArrayUtility::isValidPath($localConfiguration, $path)) {
+                               $result = TRUE;
+                               $localConfiguration = Utility\ArrayUtility::removeByPath($localConfiguration, $path);
+                       }
+               }
+               $this->writeLocalConfiguration($localConfiguration);
+               return $result;
+       }
+
+       /**
         * Checks if the configuration can be written.
         *
         * @return boolean
index b93df02..17964c1 100644 (file)
@@ -215,7 +215,6 @@ class Bootstrap {
         */
        public function applyAdditionalConfigurationSettings() {
                $this->getInstance()
-                       ->deprecationLogForOldExtCacheSetting()
                        ->initializeExceptionHandling()
                        ->setFinalCachingFrameworkCacheConfiguration()
                        ->defineLoggingAndExceptionConstants()
@@ -628,19 +627,6 @@ class Bootstrap {
        }
 
        /**
-        * Write deprecation log if deprecated extCache setting was set in the instance.
-        *
-        * @return \TYPO3\CMS\Core\Core\Bootstrap
-        * @deprecated since 6.0, the check will be removed two version later.
-        */
-       protected function deprecationLogForOldExtCacheSetting() {
-               if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['extCache']) && $GLOBALS['TYPO3_CONF_VARS']['SYS']['extCache'] !== -1) {
-                       Utility\GeneralUtility::deprecationLog('Setting $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'extCache\'] is unused and can be removed from localconf.php');
-               }
-               return $this;
-       }
-
-       /**
         * Initialize exception handling
         *
         * @return \TYPO3\CMS\Core\Core\Bootstrap
index 22a0ec6..543fd67 100644 (file)
@@ -201,7 +201,7 @@ class ArrayUtility {
                foreach ($path as $segment) {
                        // Fail if the part is empty
                        if (empty($segment)) {
-                               throw new \RuntimeException('Invalid path specified: ' . $path, 1341406846);
+                               throw new \RuntimeException('Invalid path segment specified', 1341406846);
                        }
                        // Create cell if it doesn't exist
                        if (!array_key_exists($segment, $pointer)) {
@@ -216,6 +216,46 @@ class ArrayUtility {
        }
 
        /**
+        * Remove a sub part from an array specified by path
+        *
+        * @param array $array Input array to manipulate
+        * @param string $path Path to remove from array
+        * @param string $delimiter Path delimiter
+        * @return array Modified array
+        * @throws \RuntimeException
+        */
+       static public function removeByPath(array $array, $path, $delimiter = '/') {
+               if (empty($path)) {
+                       throw new \RuntimeException('Path must not be empty', 1371757718);
+               }
+               if (!is_string($path)) {
+                       throw new \RuntimeException('Path must be a string', 1371757719);
+               }
+               // Extract parts of the path
+               $path = str_getcsv($path, $delimiter);
+               $pathDepth = count($path);
+               $currentDepth = 0;
+               $pointer = &$array;
+               // Find path in given array
+               foreach ($path as $segment) {
+                       $currentDepth++;
+                       // Fail if the part is empty
+                       if (empty($segment)) {
+                               throw new \RuntimeException('Invalid path segment specified', 1371757720);
+                       }
+                       if (!array_key_exists($segment, $pointer)) {
+                               throw new \RuntimeException('Path segment ' . $segment . ' does not exist in array', 1371758436);
+                       }
+                       if ($currentDepth === $pathDepth) {
+                               unset($pointer[$segment]);
+                       } else {
+                               $pointer = &$pointer[$segment];
+                       }
+               }
+               return $array;
+       }
+
+       /**
         * Sorts an array recursively by key
         *
         * @param $array Array to sort recursively by key
@@ -392,7 +432,7 @@ class ArrayUtility {
        }
 
        /**
-        * Renumber the keys of an array to avoid leaps is keys are all numeric.
+        * Renumber the keys of an array to avoid leaps if keys are all numeric.
         *
         * Is called recursively for nested arrays.
         *
index 172a228..6629fef 100644 (file)
@@ -219,7 +219,6 @@ return array(
                'allowSystemInstall' => FALSE,          // Boolean: If set, you can install extensions in the sysext/ dir. Use this to upgrade the 'cms' and 'lang' extensions.
                'requiredExt' => array(),               // String. List of additional extensions which are REQUIRED and cannot be unloaded by the Extension Manager!
                'excludeForPackaging' => '(CVS|\\..*|.*~|.*\\.bak)',            // String: List of directories and files which will not be packaged into extensions nor taken into account otherwise by the Extension Manager. Perl regular expression syntax!
-               'extCache' => -1,               // <p>Integer (0, 1)</p><dl><dt>0</dt><dd>ext-scripts (ext_localconf.php and ext_tables.php) are NOT cached, but included every time</dd><dt>1</dt><dd>scripts cached to typo3conf/temp_CACHED_[sitePathHash]* (saves some milliseconds even with PHP accelerators)</dd></dl>
                'extListArray' => array(
                        'filelist',
                        'version',
index 4257ff0..507e9f6 100644 (file)
@@ -294,6 +294,66 @@ class ConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        /**
         * @test
         */
+       public function removeLocalConfigurationKeysByPathRemovesGivenPathsFromConfigurationAndReturnsTrue() {
+               $currentLocalConfiguration = array(
+                       'toRemove1' => 'foo',
+                       'notChanged' => 23,
+                       'toRemove2' => 'bar',
+               );
+               $expectedConfiguration = array(
+                       'notChanged' => 23,
+               );
+
+               $this->createFixtureWithMockedMethods(
+                       array(
+                               'getLocalConfiguration',
+                               'writeLocalConfiguration',
+                       )
+               );
+               $this->fixture->expects($this->once())
+                       ->method('getLocalConfiguration')
+                       ->will($this->returnValue($currentLocalConfiguration));
+               $this->fixture->expects($this->once())
+                       ->method('writeLocalConfiguration')
+                       ->with($expectedConfiguration);
+
+               $removePaths = array(
+                       'toRemove1',
+                       'toRemove2',
+               );
+               $this->assertTrue($this->fixture->removeLocalConfigurationKeysByPath($removePaths));
+       }
+
+       /**
+        * @test
+        */
+       public function removeLocalConfigurationKeysByPathReturnsFalseIfNothingIsRemoved() {
+               $currentLocalConfiguration = array(
+                       'notChanged' => 23,
+               );
+               $expectedConfiguration = array(
+                       'notChanged' => 23,
+               );
+               $this->createFixtureWithMockedMethods(
+                       array(
+                               'getLocalConfiguration',
+                               'writeLocalConfiguration',
+                       )
+               );
+               $this->fixture->expects($this->once())
+                       ->method('getLocalConfiguration')
+                       ->will($this->returnValue($currentLocalConfiguration));
+               $this->fixture->expects($this->once())
+                       ->method('writeLocalConfiguration')
+                       ->with($expectedConfiguration);
+
+               $removePaths = array();
+               $this->assertFalse($this->fixture->removeLocalConfigurationKeysByPath($removePaths));
+       }
+
+       /**
+        * @test
+        */
        public function canWriteConfigurationReturnsFalseIfDirectoryIsNotWritable() {
                if (function_exists('posix_getegid') && posix_getegid() === 0) {
                        $this->markTestSkipped('Test skipped if run on linux as root');
index b5bdfae..27a9f96 100644 (file)
@@ -24,8 +24,10 @@ namespace TYPO3\CMS\Core\Tests\Unit\Utility;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use \TYPO3\CMS\Core\Utility\ArrayUtility;
+
 /**
- * Testcase for class \TYPO3\CMS\Core\Utility\ArrayUtility
+ * Test case
  *
  * @author Susanne Moog <typo3@susanne-moog.de>
  * @author Christian Kuhn <lolli@schwarzbu.ch>
@@ -171,7 +173,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function filterByValueRecursiveCorrectlyFiltersArray($needle, $haystack, $expectedResult) {
                $this->assertEquals(
                        $expectedResult,
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($needle, $haystack)
+                       ArrayUtility::filterByValueRecursive($needle, $haystack)
                );
        }
 
@@ -182,7 +184,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $instance = new \stdClass();
                $this->assertEquals(
                        array($instance),
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($instance, array($instance))
+                       ArrayUtility::filterByValueRecursive($instance, array($instance))
                );
        }
 
@@ -192,7 +194,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function filterByValueRecursiveDoesNotMatchDifferentInstancesOfSameClass() {
                $this->assertEquals(
                        array(),
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive(new \stdClass(), array(new \stdClass()))
+                       ArrayUtility::filterByValueRecursive(new \stdClass(), array(new \stdClass()))
                );
        }
 
@@ -248,7 +250,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \RuntimeException
         */
        public function getValueByPathThrowsExceptionIfPathIsEmpty() {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath(array(), '');
+               ArrayUtility::getValueByPath(array(), '');
        }
 
        /**
@@ -308,7 +310,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \RuntimeException
         */
        public function getValueByPathThrowsExceptionIfPathNotExists(array $array, $path) {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath($array, $path);
+               ArrayUtility::getValueByPath($array, $path);
        }
 
        /**
@@ -408,7 +410,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider getValueByPathValidDataProvider
         */
        public function getValueByPathGetsCorrectValue(array $array, $path, $expectedResult) {
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath($array, $path));
+               $this->assertEquals($expectedResult, ArrayUtility::getValueByPath($array, $path));
        }
 
        /**
@@ -428,7 +430,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $delimeter = '%';
                $this->assertEquals(
                        $expected,
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath($input, $searchPath, $delimeter)
+                       ArrayUtility::getValueByPath($input, $searchPath, $delimeter)
                );
        }
 
@@ -440,7 +442,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \RuntimeException
         */
        public function setValueByPathThrowsExceptionIfPathIsEmpty() {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath(array(), '', NULL);
+               ArrayUtility::setValueByPath(array(), '', NULL);
        }
 
        /**
@@ -448,7 +450,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \RuntimeException
         */
        public function setValueByPathThrowsExceptionIfPathIsNotAString() {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath(array(), array('foo'), NULL);
+               ArrayUtility::setValueByPath(array(), array('foo'), NULL);
        }
 
        /**
@@ -629,7 +631,133 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function setValueByPathSetsCorrectValue(array $array, $path, $value, $expectedResult) {
                $this->assertEquals(
                        $expectedResult,
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath($array, $path, $value)
+                       ArrayUtility::setValueByPath($array, $path, $value)
+               );
+       }
+
+       /**********************
+       /* Tests concerning removeByPath
+        ***********************/
+
+       /**
+        * @test
+        * @expectedException \RuntimeException
+        */
+       public function removeByPathThrowsExceptionIfPathIsEmpty() {
+               ArrayUtility::removeByPath(array(), '');
+       }
+
+       /**
+        * @test
+        * @expectedException \RuntimeException
+        */
+       public function removeByPathThrowsExceptionIfPathIsNotAString() {
+               ArrayUtility::removeByPath(array(), array('foo'));
+       }
+
+       /**
+        * @test
+        * @expectedException \RuntimeException
+        */
+       public function removeByPathThrowsExceptionWithEmptyPathSegment() {
+               $inputArray = array(
+                       'foo' => array(
+                               'bar' => 42,
+                       ),
+               );
+               ArrayUtility::removeByPath($inputArray, 'foo//bar');
+       }
+
+       /**
+        * @test
+        * @expectedException \RuntimeException
+        */
+       public function removeByPathThrowsExceptionIfPathDoesNotExistInArray() {
+               $inputArray = array(
+                       'foo' => array(
+                               'bar' => 42,
+                       ),
+               );
+               ArrayUtility::removeByPath($inputArray, 'foo/baz');
+       }
+
+       /**
+        * @test
+        */
+       public function removeByPathAcceptsGivenDelimiter() {
+               $inputArray = array(
+                       'foo' => array(
+                               'toRemove' => 42,
+                               'keep' => 23
+                       ),
+               );
+               $path = 'foo.toRemove';
+               $expected = array(
+                       'foo' => array(
+                               'keep' => 23,
+                       ),
+               );
+               $this->assertEquals(
+                       $expected,
+                       ArrayUtility::removeByPath($inputArray, $path, '.')
+               );
+       }
+
+       /**
+        * Data provider for removeByPathRemovesCorrectPath
+        */
+       public function removeByPathRemovesCorrectPathDataProvider() {
+               return array(
+                       'single value' => array(
+                               array(
+                                       'foo' => array(
+                                               'toRemove' => 42,
+                                               'keep' => 23
+                                       ),
+                               ),
+                               'foo/toRemove',
+                               array(
+                                       'foo' => array(
+                                               'keep' => 23,
+                                       ),
+                               ),
+                       ),
+                       'whole array' => array(
+                               array(
+                                       'foo' => array(
+                                               'bar' => 42
+                                       ),
+                               ),
+                               'foo',
+                               array(),
+                       ),
+                       'sub array' => array(
+                               array(
+                                       'foo' => array(
+                                               'keep' => 23,
+                                               'toRemove' => array(
+                                                       'foo' => 'bar',
+                                               ),
+                                       ),
+                               ),
+                               'foo/toRemove',
+                               array(
+                                       'foo' => array(
+                                               'keep' => 23,
+                                       ),
+                               ),
+                       ),
+               );
+       }
+
+       /**
+        * @test
+        * @dataProvider removeByPathRemovesCorrectPathDataProvider
+        */
+       public function removeByPathRemovesCorrectPath(array $array, $path, $expectedResult) {
+               $this->assertEquals(
+                       $expectedResult,
+                       ArrayUtility::removeByPath($array, $path)
                );
        }
 
@@ -660,7 +788,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        ),
                        'z' => NULL
                );
-               $this->assertSame($expectedResult, \TYPO3\CMS\Core\Utility\ArrayUtility::sortByKeyRecursive($unsortedArray));
+               $this->assertSame($expectedResult, ArrayUtility::sortByKeyRecursive($unsortedArray));
        }
 
        ///////////////////////
@@ -701,7 +829,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                TAB . '\'qux\' => 0.1,' . LF .
                                TAB . '\'qux2\' => 1.0E-9,' . LF .
                        ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
+               $this->assertSame($expected, ArrayUtility::arrayExport($array));
        }
 
        /**
@@ -714,7 +842,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                'bar' => new \stdClass()
                        )
                );
-               \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array);
+               ArrayUtility::arrayExport($array);
        }
 
        /**
@@ -732,7 +860,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                TAB . '23 => \'integer key\',' . LF .
                                TAB . '42 => \'string key representing integer\',' . LF .
                        ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
+               $this->assertSame($expected, ArrayUtility::arrayExport($array));
        }
 
        /**
@@ -750,7 +878,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                TAB . '\'one\',' . LF .
                                TAB . '\'two\',' . LF .
                        ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
+               $this->assertSame($expected, ArrayUtility::arrayExport($array));
        }
 
        /**
@@ -770,7 +898,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                TAB . '3 => \'three\',' . LF .
                                TAB . '4 => \'four\',' . LF .
                        ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
+               $this->assertSame($expected, ArrayUtility::arrayExport($array));
        }
 
 
@@ -877,7 +1005,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider flattenCalculatesExpectedResultDataProvider
         */
        public function flattenCalculatesExpectedResult(array $array, array $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::flatten($array));
+               $this->assertEquals($expected, ArrayUtility::flatten($array));
        }
 
 
@@ -1089,7 +1217,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider intersectRecursiveCalculatesExpectedResultDataProvider
         */
        public function intersectRecursiveCalculatesExpectedResult(array $source, array $mask, array $expected) {
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::intersectRecursive($source, $mask));
+               $this->assertSame($expected, ArrayUtility::intersectRecursive($source, $mask));
        }
 
 
@@ -1221,7 +1349,7 @@ class ArrayUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider renumberKeysToAvoidLeapsIfKeysAreAllNumericDataProvider
         */
        public function renumberKeysToAvoidLeapsIfKeysAreAllNumeric(array $inputArray, array $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::renumberKeysToAvoidLeapsIfKeysAreAllNumeric($inputArray));
+               $this->assertEquals($expected, ArrayUtility::renumberKeysToAvoidLeapsIfKeysAreAllNumeric($inputArray));
        }
 
 }
index 16d6215..ad33539 100644 (file)
@@ -43,6 +43,51 @@ class StepController extends AbstractController {
        );
 
        /**
+        * @var array List of obsolete configuration options in LocalConfiguration to be removed
+        */
+       protected $obsoleteLocalConfigurationSettings = array(
+               // @TODO: #34092 - Remove it? Still used in core
+               // 'BE/forceCharset',
+               // #26519
+               'BE/loginLabels',
+               // #44506
+               'BE/loginNews',
+               // #30613
+               'BE/useOnContextMenuHandler',
+               // #48179
+               'EXT/em_mirrorListURL',
+               'EXT/em_wsdlURL',
+               // #43094
+               'EXT/extList',
+               // #35877
+               'EXT/extList_FE',
+               // #41813
+               'EXT/noEdit',
+               // #26090
+               'FE/defaultTypoScript_editorcfg',
+               'FE/defaultTypoScript_editorcfg.',
+               // #25099
+               'FE/simulateStaticDocuments',
+               // @TODO: #14441 - Still referenced at one place
+               //'GFX/gdlib_2',
+               // # ?
+               'GFX/noIconProc',
+               // #17606
+               'GFX/TTFLocaleConv',
+               // #39164
+               'SYS/additionalAllowedClassPrefixes',
+               // #27689
+               'SYS/caching/cacheBackends',
+               'SYS/caching/cacheFrontends',
+               // #38414
+               'SYS/extCache',
+               // @TODO: #35923 - Still referenced in SqlSchemaMigrationService
+               //'SYS/multiplyDBfieldSize',
+               // #46993
+               'SYS/T3instID',
+       );
+
+       /**
         * Index action acts a a dispatcher to different steps
         *
         * @throws Exception
@@ -52,11 +97,12 @@ class StepController extends AbstractController {
                $this->loadBaseExtensions();
                $this->initializeObjectManager();
 
-               // Warning: Order of this methods is security relevant and interferes with different access
+               // Warning: Order of these methods is security relevant and interferes with different access
                // conditions (new/existing installation). See the single method comments for details.
                $this->outputInstallToolNotEnabledMessageIfNeeded();
                $this->migrateLocalconfToLocalConfigurationIfNeeded();
                $this->outputInstallToolPasswordNotSetMessageIfNeeded();
+               $this->removeObsoleteLocalConfigurationSettings();
                $this->executeOrOutputFirstInstallStepIfNeeded();
                $this->generateEncryptionKeyIfNeeded();
                $this->initializeSession();
@@ -248,6 +294,24 @@ class StepController extends AbstractController {
        }
 
        /**
+        * Some settings in LocalConfiguration vanished in DefaultConfiguration
+        * and have no impact on the core anymore.
+        * To keep the configuration clean, those old settings are just silently
+        * removed from LocalConfiguration if set.
+        *
+        * @return void
+        */
+       protected function removeObsoleteLocalConfigurationSettings() {
+               /** @var \TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager */
+               $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
+               $removed = $configurationManager->removeLocalConfigurationKeysByPath($this->obsoleteLocalConfigurationSettings);
+               // If something was changed: Trigger a reload to have new values in next request
+               if ($removed) {
+                       $this->redirect();
+               }
+       }
+
+       /**
         * The first install step has a special standing and needs separate handling:
         * At this point no directory exists (no typo3conf, no typo3temp), so we can
         * not start the session handling (that stores the install tool session within typo3temp).
index 5b196a1..515ded6 100644 (file)
@@ -58,7 +58,7 @@ class ToolController extends AbstractController {
                $this->loadBaseExtensions();
                $this->initializeObjectManager();
 
-               // Warning: Order of this methods is security relevant and interferes with different access
+               // Warning: Order of these methods is security relevant and interferes with different access
                // conditions (new/existing installation). See the single method comments for details.
                $this->outputInstallToolNotEnabledMessageIfNeeded();
                $this->outputInstallToolPasswordNotSetMessageIfNeeded();