[BUGFIX] Populate extension configuration on install 09/55209/3
authorHelmut Hummel <typo3@helhum.io>
Sun, 24 Dec 2017 12:38:55 +0000 (13:38 +0100)
committerHelmut Hummel <typo3@helhum.io>
Wed, 10 Jan 2018 15:17:24 +0000 (16:17 +0100)
Instead of duplicating default extension configuration
in DefaultConfiguration.php, we now populate it
after LocalConfiguration.php has been written.

Benefit is that we don't duplicate configuration and
that we even can have other system extensions enabled
by default without having to touch anything.

Resolves: #83420
Releases: master
Change-Id: I4118066e986bc7bab2dcb0cc67dbd4a2d89c70a3
Reviewed-on: https://review.typo3.org/55209
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/FactoryConfiguration.php
typo3/sysext/install/Classes/Controller/InstallerController.php
typo3/sysext/saltedpasswords/ext_conf_template.txt

index eba8751..c6bb247 100644 (file)
@@ -808,24 +808,6 @@ return [
         'excludeForPackaging' => '(?:\\..*(?!htaccess)|.*~|.*\\.swp|.*\\.bak|\\.sass-cache|node_modules|bower_components)',
         'runtimeActivatedPackages' => [],
     ],
-    // Custom options shipped by extensions
-    'EXTENSIONS' => [
-        'saltedpasswords' => [
-            'BE' => [
-                'saltedPWHashingMethod' => \TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt::class,
-                'forceSalted' => 0,
-                'onlyAuthService' => 0,
-                'updatePasswd' => 1,
-            ],
-            'FE' => [
-                'enabled' => 0,
-                'saltedPWHashingMethod' => \TYPO3\CMS\Saltedpasswords\Salt\PhpassSalt::class,
-                'forceSalted' => 0,
-                'onlyAuthService' => 0,
-                'updatePasswd' => 1,
-            ],
-        ],
-    ],
     'BE' => [
         // Backend Configuration.
         'languageDebug' => false,
@@ -855,34 +837,34 @@ return [
         'checkStoredRecords' => true,
         'checkStoredRecordsLoose' => true,
         'defaultUserTSconfig' => 'options.enableBookmarks=1
-                       options.file_list.enableDisplayBigControlPanel=selectable
-                       options.file_list.enableDisplayThumbnails=selectable
-                       options.file_list.enableClipBoard=selectable
-                       options.file_list.thumbnail {
-                               width = 64
-                               height = 64
-                       }
-                       options.pageTree {
-                               doktypesToShowInNewPageDragArea = 1,6,4,7,3,254,255,199
-                       }
+            options.file_list.enableDisplayBigControlPanel=selectable
+            options.file_list.enableDisplayThumbnails=selectable
+            options.file_list.enableClipBoard=selectable
+            options.file_list.thumbnail {
+                width = 64
+                height = 64
+            }
+            options.pageTree {
+                doktypesToShowInNewPageDragArea = 1,6,4,7,3,254,255,199
+            }
 
-                       options.contextMenu {
-                               table {
-                                       pages {
-                                               disableItems =
-                                               tree.disableItems =
-                                       }
-                                       sys_file {
-                                               disableItems =
-                                               tree.disableItems =
-                                       }
-                                       sys_filemounts {
-                                               disableItems =
-                                               tree.disableItems =
-                                       }
-                               }
-                       }
-               ',
+            options.contextMenu {
+                table {
+                    pages {
+                        disableItems =
+                        tree.disableItems =
+                    }
+                    sys_file {
+                        disableItems =
+                        tree.disableItems =
+                    }
+                    sys_filemounts {
+                        disableItems =
+                        tree.disableItems =
+                    }
+                }
+            }
+        ',
         // String (exclude). Enter lines of default backend user/group TSconfig.
         'defaultPageTSconfig' => '
             mod.web_list.enableDisplayBigControlPanel=selectable
index dbac51c..94e5401 100644 (file)
@@ -18,47 +18,6 @@ return [
             ],
         ],
     ],
-    'EXTENSIONS' => [
-        'backend' => [
-            'backendFavicon' => '',
-            'backendLogo' => '',
-            'loginBackgroundImage' => '',
-            'loginFootnote' => '',
-            'loginHighlightColor' => '',
-            'loginLogo' => '',
-        ],
-        'extensionmanager' => [
-            'automaticInstallation' => 1,
-            'offlineMode' => 0,
-        ],
-        'rsaauth' => [
-            'temporaryDirectory' => '',
-        ],
-        'saltedpasswords' => [
-            'BE' => [
-                'saltedPWHashingMethod' => \TYPO3\CMS\Saltedpasswords\Salt\Pbkdf2Salt::class,
-                'forceSalted' => 0,
-                'onlyAuthService' => 0,
-                'updatePasswd' => 1,
-            ],
-            'FE' => [
-                'enabled' => 1,
-                'saltedPWHashingMethod' => \TYPO3\CMS\Saltedpasswords\Salt\Pbkdf2Salt::class,
-                'forceSalted' => 0,
-                'onlyAuthService' => 0,
-                'updatePasswd' => 1,
-            ],
-            'checkConfigurationBE' => '0',
-            'checkConfigurationBE2' => '0',
-            'checkConfigurationFE' => '0',
-            'checkConfigurationFE2' => '0',
-        ],
-        'scheduler' => [
-            'enableBELog' => 1,
-            'maxLifetime' => 1440,
-            'showSampleTasks' => 1,
-        ],
-    ],
     'FE' => [
         'loginSecurityLevel' => 'rsa',
     ],
index 271798a..a14931b 100644 (file)
@@ -41,6 +41,7 @@ use TYPO3\CMS\Install\Configuration\FeatureManager;
 use TYPO3\CMS\Install\FolderStructure\DefaultFactory;
 use TYPO3\CMS\Install\Service\EnableFileService;
 use TYPO3\CMS\Install\Service\Exception\ConfigurationChangedException;
+use TYPO3\CMS\Install\Service\ExtensionConfigurationService;
 use TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService;
 use TYPO3\CMS\Install\SystemEnvironment\Check;
 use TYPO3\CMS\Install\SystemEnvironment\SetupCheck;
@@ -167,6 +168,10 @@ class InstallerController
                 }
                 $packageManager->forceSortAndSavePackageStates();
             }
+            $extensionConfigurationService = new ExtensionConfigurationService();
+            $extensionConfigurationService->synchronizeExtConfTemplateWithLocalConfigurationOfAllExtensions();
+            Bootstrap::getInstance()->populateLocalConfiguration();
+
             return new JsonResponse([
                 'success' => true,
             ]);
index e6a1cc7..b3c77bf 100644 (file)
@@ -8,10 +8,10 @@ checkConfigurationBE=0
 FE.enabled = 1
 
 # cat=Basic/enable; type=user[TYPO3\CMS\Saltedpasswords\Utility\ExtensionManagerConfigurationUtility->buildHashMethodSelectorFE]; label=LLL:EXT:saltedpasswords/Resources/Private/Language/locallang_em.xlf:saltedpasswords.config.FE.saltedPWHashingMethod
-FE.saltedPWHashingMethod = tx_saltedpasswords_salts_phpass
+FE.saltedPWHashingMethod = TYPO3\CMS\Saltedpasswords\Salt\Pbkdf2Salt
 
 # cat=Basic/enable; type=user[TYPO3\CMS\Saltedpasswords\Utility\ExtensionManagerConfigurationUtility->buildHashMethodSelectorBE]; label=LLL:EXT:saltedpasswords/Resources/Private/Language/locallang_em.xlf:saltedpasswords.config.BE.saltedPWHashingMethod
-BE.saltedPWHashingMethod = tx_saltedpasswords_salts_phpass
+BE.saltedPWHashingMethod = TYPO3\CMS\Saltedpasswords\Salt\Pbkdf2Salt
 
 # cat=Frontend; type=user[TYPO3\CMS\Saltedpasswords\Utility\ExtensionManagerConfigurationUtility->checkConfigurationFrontend]; label=LLL:EXT:saltedpasswords/Resources/Private/Language/locallang_em.xlf:saltedpasswords.config.checkConfigurationFE2
 checkConfigurationFE2=0