From 8112b3cd899abb5098fe214f018c5f1699673c0d Mon Sep 17 00:00:00 2001
From: Oliver Bartsch <bo@cedev.de>
Date: Tue, 24 Aug 2021 18:21:04 +0200
Subject: [PATCH] [TASK] Declare strict types in ext_localconf.php files

Since #94739 it's possible to declare strict types
in ext_localconf.php files. This patch does this
through the core.

Resolves: #94981
Related: #94739
Releases: master
Change-Id: I61a937a487d5d065daccc58ca997a1ffd80f9d35
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70743
Tested-by: core-ci <typo3@b13.com>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
---
 typo3/sysext/adminpanel/ext_localconf.php           | 2 ++
 typo3/sysext/backend/ext_localconf.php              | 2 ++
 typo3/sysext/core/ext_localconf.php                 | 2 ++
 typo3/sysext/dashboard/ext_localconf.php            | 2 ++
 typo3/sysext/extbase/ext_localconf.php              | 2 ++
 typo3/sysext/extensionmanager/ext_localconf.php     | 2 ++
 typo3/sysext/felogin/ext_localconf.php              | 2 ++
 typo3/sysext/filelist/ext_localconf.php             | 2 ++
 typo3/sysext/fluid_styled_content/ext_localconf.php | 2 ++
 typo3/sysext/form/ext_localconf.php                 | 2 ++
 typo3/sysext/frontend/ext_localconf.php             | 2 ++
 typo3/sysext/impexp/ext_localconf.php               | 2 ++
 typo3/sysext/indexed_search/ext_localconf.php       | 2 ++
 typo3/sysext/install/ext_localconf.php              | 2 ++
 typo3/sysext/linkvalidator/ext_localconf.php        | 2 ++
 typo3/sysext/opendocs/ext_localconf.php             | 2 ++
 typo3/sysext/recordlist/ext_localconf.php           | 2 ++
 typo3/sysext/recycler/ext_localconf.php             | 2 ++
 typo3/sysext/redirects/ext_localconf.php            | 2 ++
 typo3/sysext/reports/ext_localconf.php              | 2 ++
 typo3/sysext/rte_ckeditor/ext_localconf.php         | 2 ++
 typo3/sysext/scheduler/ext_localconf.php            | 2 ++
 typo3/sysext/seo/ext_localconf.php                  | 2 ++
 typo3/sysext/sys_note/ext_localconf.php             | 2 ++
 typo3/sysext/t3editor/ext_localconf.php             | 2 ++
 typo3/sysext/tstemplate/ext_localconf.php           | 2 ++
 typo3/sysext/workspaces/ext_localconf.php           | 2 ++
 27 files changed, 54 insertions(+)

diff --git a/typo3/sysext/adminpanel/ext_localconf.php b/typo3/sysext/adminpanel/ext_localconf.php
index 47228df1e944..132809c3abb3 100644
--- a/typo3/sysext/adminpanel/ext_localconf.php
+++ b/typo3/sysext/adminpanel/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] = [
diff --git a/typo3/sysext/backend/ext_localconf.php b/typo3/sysext/backend/ext_localconf.php
index 2739f013e6cf..8f138df4c9ae 100644
--- a/typo3/sysext/backend/ext_localconf.php
+++ b/typo3/sysext/backend/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433106] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::class;
diff --git a/typo3/sysext/core/ext_localconf.php b/typo3/sysext/core/ext_localconf.php
index 971b809d0aba..ee3ebb76e3b6 100644
--- a/typo3/sysext/core/ext_localconf.php
+++ b/typo3/sysext/core/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Utility\GeneralUtility::class]['moveUploadedFile'][] = \TYPO3\CMS\Core\Resource\Security\SvgHookHandler::class . '->processMoveUploadedFile';
diff --git a/typo3/sysext/dashboard/ext_localconf.php b/typo3/sysext/dashboard/ext_localconf.php
index c0fc3acef071..b3a9d5164eec 100644
--- a/typo3/sysext/dashboard/ext_localconf.php
+++ b/typo3/sysext/dashboard/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['dashboard_rss'] ?? null)) {
diff --git a/typo3/sysext/extbase/ext_localconf.php b/typo3/sysext/extbase/ext_localconf.php
index db083e9274ba..e6845e756a89 100644
--- a/typo3/sysext/extbase/ext_localconf.php
+++ b/typo3/sysext/extbase/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Register type converters
diff --git a/typo3/sysext/extensionmanager/ext_localconf.php b/typo3/sysext/extensionmanager/ext_localconf.php
index 48497171a635..a796e6dd0dec 100644
--- a/typo3/sysext/extensionmanager/ext_localconf.php
+++ b/typo3/sysext/extensionmanager/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Register extension list update task
diff --git a/typo3/sysext/felogin/ext_localconf.php b/typo3/sysext/felogin/ext_localconf.php
index 29666477b149..2319fdadd1d2 100644
--- a/typo3/sysext/felogin/ext_localconf.php
+++ b/typo3/sysext/felogin/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Add default TypoScript
diff --git a/typo3/sysext/filelist/ext_localconf.php b/typo3/sysext/filelist/ext_localconf.php
index f1ee01b8ee1f..6c6304836f11 100644
--- a/typo3/sysext/filelist/ext_localconf.php
+++ b/typo3/sysext/filelist/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418731] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileProvider::class;
diff --git a/typo3/sysext/fluid_styled_content/ext_localconf.php b/typo3/sysext/fluid_styled_content/ext_localconf.php
index aae806acd547..22498d5d9645 100644
--- a/typo3/sysext/fluid_styled_content/ext_localconf.php
+++ b/typo3/sysext/fluid_styled_content/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Define TypoScript as content rendering template
diff --git a/typo3/sysext/form/ext_localconf.php b/typo3/sysext/form/ext_localconf.php
index 1ce048f51032..5c5c97fbb57e 100644
--- a/typo3/sysext/form/ext_localconf.php
+++ b/typo3/sysext/form/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 call_user_func(function () {
diff --git a/typo3/sysext/frontend/ext_localconf.php b/typo3/sysext/frontend/ext_localconf.php
index 38b65572f883..b840aacac556 100644
--- a/typo3/sysext/frontend/ext_localconf.php
+++ b/typo3/sysext/frontend/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Register all available content objects
diff --git a/typo3/sysext/impexp/ext_localconf.php b/typo3/sysext/impexp/ext_localconf.php
index bf01ba88a6ab..54dc62837c92 100644
--- a/typo3/sysext/impexp/ext_localconf.php
+++ b/typo3/sysext/impexp/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Impexp\Hook\BackendControllerHook::class . '->addJavaScript';
diff --git a/typo3/sysext/indexed_search/ext_localconf.php b/typo3/sysext/indexed_search/ext_localconf.php
index 693b977a77e7..e46ba61a2e6e 100644
--- a/typo3/sysext/indexed_search/ext_localconf.php
+++ b/typo3/sysext/indexed_search/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // register plugin
diff --git a/typo3/sysext/install/ext_localconf.php b/typo3/sysext/install/ext_localconf.php
index b1f18aa9f9e4..4ce49fe9b3c7 100644
--- a/typo3/sysext/install/ext_localconf.php
+++ b/typo3/sysext/install/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // v9->v10 wizards below this line
diff --git a/typo3/sysext/linkvalidator/ext_localconf.php b/typo3/sysext/linkvalidator/ext_localconf.php
index 4880a2c60952..0e29b59d1715 100644
--- a/typo3/sysext/linkvalidator/ext_localconf.php
+++ b/typo3/sysext/linkvalidator/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
diff --git a/typo3/sysext/opendocs/ext_localconf.php b/typo3/sysext/opendocs/ext_localconf.php
index 9148efb3ffc5..b2e9e1ef004a 100644
--- a/typo3/sysext/opendocs/ext_localconf.php
+++ b/typo3/sysext/opendocs/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433112] = \TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::class;
diff --git a/typo3/sysext/recordlist/ext_localconf.php b/typo3/sysext/recordlist/ext_localconf.php
index 5ff3ee58315e..36beece8603f 100644
--- a/typo3/sysext/recordlist/ext_localconf.php
+++ b/typo3/sysext/recordlist/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Register element browsers
diff --git a/typo3/sysext/recycler/ext_localconf.php b/typo3/sysext/recycler/ext_localconf.php
index 2eaf62f6993a..3aea9703164b 100644
--- a/typo3/sysext/recycler/ext_localconf.php
+++ b/typo3/sysext/recycler/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Recycler\Task\CleanerTask::class] = [
diff --git a/typo3/sysext/redirects/ext_localconf.php b/typo3/sysext/redirects/ext_localconf.php
index dc22cc9538d7..5f668f794b72 100644
--- a/typo3/sysext/redirects/ext_localconf.php
+++ b/typo3/sysext/redirects/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Rebuild cache in DataHandler on changing / inserting / adding redirect records
diff --git a/typo3/sysext/reports/ext_localconf.php b/typo3/sysext/reports/ext_localconf.php
index f962a21a666d..fdc0d2906270 100644
--- a/typo3/sysext/reports/ext_localconf.php
+++ b/typo3/sysext/reports/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Reports\Task\SystemStatusUpdateTask::class] = [
diff --git a/typo3/sysext/rte_ckeditor/ext_localconf.php b/typo3/sysext/rte_ckeditor/ext_localconf.php
index 470babe89413..dc5e83e15229 100644
--- a/typo3/sysext/rte_ckeditor/ext_localconf.php
+++ b/typo3/sysext/rte_ckeditor/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Register FormEngine node type resolver hook to render RTE in FormEngine if enabled
diff --git a/typo3/sysext/scheduler/ext_localconf.php b/typo3/sysext/scheduler/ext_localconf.php
index b99bb4f0be34..4b108e980a8a 100644
--- a/typo3/sysext/scheduler/ext_localconf.php
+++ b/typo3/sysext/scheduler/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Get the extensions's configuration
diff --git a/typo3/sysext/seo/ext_localconf.php b/typo3/sysext/seo/ext_localconf.php
index 0f0eaad0f7bf..dd77f34b8885 100644
--- a/typo3/sysext/seo/ext_localconf.php
+++ b/typo3/sysext/seo/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['metatag'] =
diff --git a/typo3/sysext/sys_note/ext_localconf.php b/typo3/sysext/sys_note/ext_localconf.php
index ac6bad7ac45c..710bfae8a4b4 100644
--- a/typo3/sysext/sys_note/ext_localconf.php
+++ b/typo3/sysext/sys_note/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // Hook into the page modules
diff --git a/typo3/sysext/t3editor/ext_localconf.php b/typo3/sysext/t3editor/ext_localconf.php
index eec7794eacbf..afa20f0e83a1 100644
--- a/typo3/sysext/t3editor/ext_localconf.php
+++ b/typo3/sysext/t3editor/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'][] =
diff --git a/typo3/sysext/tstemplate/ext_localconf.php b/typo3/sysext/tstemplate/ext_localconf.php
index 505c2c915cb2..f4f725796574 100644
--- a/typo3/sysext/tstemplate/ext_localconf.php
+++ b/typo3/sysext/tstemplate/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['tstemplate'] = \TYPO3\CMS\Tstemplate\Hooks\DataHandlerClearCachePostProcHook::class . '->clearPageCacheIfNecessary';
diff --git a/typo3/sysext/workspaces/ext_localconf.php b/typo3/sysext/workspaces/ext_localconf.php
index 854f6b1eff06..a71ac144e573 100644
--- a/typo3/sysext/workspaces/ext_localconf.php
+++ b/typo3/sysext/workspaces/ext_localconf.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 defined('TYPO3') or die();
 
 // add default notification options to every page
-- 
GitLab