diff --git a/typo3/sysext/core/Classes/Configuration/ExtensionConfiguration.php b/typo3/sysext/core/Classes/Configuration/ExtensionConfiguration.php index 515bf89c9da09cb8b88bfbcb4fe459a5a7fb974d..340d2fc4d8d291d5627a332a832334fdae4f5dba 100644 --- a/typo3/sysext/core/Classes/Configuration/ExtensionConfiguration.php +++ b/typo3/sysext/core/Classes/Configuration/ExtensionConfiguration.php @@ -142,20 +142,14 @@ class ExtensionConfiguration * ->set() call and values may not end up as expected. * * @param string $extension Extension name - * @param string $path Configuration path to set - eg. "featureCategory/coolThingIsEnabled" * @param mixed|null $value The value. If null, unset the path * @internal */ - public function set(string $extension, string $path = '', $value = null): void + public function set(string $extension, $value = null): void { if (empty($extension)) { throw new \RuntimeException('extension name must not be empty', 1509715852); } - if (!empty($path)) { - // @todo: this functionality can be removed once EXT:bootstrap_package is adapted to the new API. - $extensionConfiguration = $this->get($extension); - $value = ArrayUtility::setValueByPath($extensionConfiguration, $path, $value); - } $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); if ($value === null) { // Remove whole extension config @@ -237,7 +231,7 @@ class ExtensionConfiguration ArrayUtility::mergeRecursiveWithOverrule($extConfTemplateConfiguration, $currentLocalConfiguration); // Write new config if changed. Loose array comparison to not write if only array key order is different if ($extConfTemplateConfiguration != $currentLocalConfiguration) { - $this->set($extensionKey, '', $extConfTemplateConfiguration); + $this->set($extensionKey, $extConfTemplateConfiguration); } } diff --git a/typo3/sysext/core/Tests/Unit/Configuration/ExtensionConfigurationTest.php b/typo3/sysext/core/Tests/Unit/Configuration/ExtensionConfigurationTest.php index d8e1a58cec4a6728c1ef0c1e7d2819592bc6f142..3ca1cf9874f95df342471b7111923193f6fc8c65 100644 --- a/typo3/sysext/core/Tests/Unit/Configuration/ExtensionConfigurationTest.php +++ b/typo3/sysext/core/Tests/Unit/Configuration/ExtensionConfigurationTest.php @@ -101,6 +101,6 @@ class ExtensionConfigurationTest extends UnitTestCase GeneralUtility::addInstance(ConfigurationManager::class, $configurationManagerProphecy->reveal()); $configurationManagerProphecy->setLocalConfigurationValueByPath(Argument::cetera())->shouldBeCalled(); $configurationManagerProphecy->setLocalConfigurationValueByPath('EXTENSIONS/foo', ['bar' => 'baz'])->shouldBeCalled(); - (new ExtensionConfiguration())->set('foo', '', ['bar' => 'baz']); + (new ExtensionConfiguration())->set('foo', ['bar' => 'baz']); } } diff --git a/typo3/sysext/install/Classes/Controller/SettingsController.php b/typo3/sysext/install/Classes/Controller/SettingsController.php index be44efff8e0674be66741fbc102e01483f3f173a..8328d30616acfffa3289c09c26c9128779d17ab5 100644 --- a/typo3/sysext/install/Classes/Controller/SettingsController.php +++ b/typo3/sysext/install/Classes/Controller/SettingsController.php @@ -447,7 +447,7 @@ class SettingsController extends AbstractController foreach ($configuration as $configKey => $value) { $nestedConfiguration = ArrayUtility::setValueByPath($nestedConfiguration, $configKey, $value, '.'); } - (new ExtensionConfiguration())->set($extensionKey, '', $nestedConfiguration); + (new ExtensionConfiguration())->set($extensionKey, $nestedConfiguration); $messages = [ new FlashMessage( 'Successfully saved configuration for extension "' . $extensionKey . '".',