[TASK] Remove unused log-related TYPO3_CONF_VARS 96/62296/9
authorBenni Mack <benni@typo3.org>
Mon, 11 Nov 2019 14:51:12 +0000 (15:51 +0100)
committerSusanne Moog <look@susi.dev>
Wed, 20 Nov 2019 06:42:51 +0000 (07:42 +0100)
The options

- systemLog
- systemLogLevel

have been marked as unused with TYPO3 v9.0,
and should be removed from any upgrade installation via
the SilentConfigurationUpgrade system.

Resolves: #89645
Releases: master
Change-Id: I432fbd1fb2938e0c35935d1db8fb7974b19027e5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62296
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Alexander Schnitzler <review.typo3.org@alexanderschnitzler.de>
Tested-by: Susanne Moog <look@susi.dev>
Reviewed-by: Alexander Schnitzler <review.typo3.org@alexanderschnitzler.de>
Reviewed-by: Susanne Moog <look@susi.dev>
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Router.ts
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
typo3/sysext/core/Documentation/Changelog/master/Important-89645-RemovedSystemLogOptions.rst [new file with mode: 0644]
typo3/sysext/install/Classes/Configuration/Context/CustomPreset.php
typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php
typo3/sysext/install/Classes/Configuration/Context/LivePreset.php
typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
typo3/sysext/install/Resources/Public/JavaScript/Router.js

index 1f5eb66..6ae5c2a 100644 (file)
@@ -205,7 +205,7 @@ class Router {
             + ' to manually increase debugging output in <code>typo3conf/LocalConfiguration.php</code>:'
             + '<code>[\'BE\'][\'debug\'] => true</code>, <code>[\'SYS\'][\'devIPmask\'] => \'*\'</code>, '
             + '<code>[\'SYS\'][\'displayErrors\'] => 1</code>,'
-            + '<code>[\'SYS\'][\'systemLogLevel\'] => 0</code>, <code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p>'
+            + '<code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p>'
           + '</div>'
         + '</div>'
         + '<div class="panel-group" role="tablist" aria-multiselectable="true">'
index e0e1d78..dd6c847 100644 (file)
@@ -96,8 +96,6 @@ return [
         'binSetup' => '',
         'setMemoryLimit' => 0,
         'phpTimeZone' => '',
-        'systemLog' => false,
-        'systemLogLevel' => 0,
         'UTF8filesystem' => false,
         'systemLocale' => '',
         'systemMaintainers' => null,    // @todo: This will be set up as an empty array once the installer can define a system maintainers
index 41e1139..4a82aa8 100644 (file)
@@ -130,18 +130,6 @@ SYS:
         phpTimeZone:
             type: text
             description: 'timezone to force for all date() and mktime() functions. A list of supported values can be found at <a href="http://php.net/manual/en/timezones.php" target="_blank" rel="noopener noreferrer">php.net</a>. If this is not set, a valid fallback will be searched for by PHP (php.ini''s <a href="http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone" target="_blank" rel="noopener noreferrer">date.timezone</a> setting, server defaults, etc); and if no fallback is found, the value of "UTC" is used instead.'
-        systemLog:
-            type: bool
-            description: 'Enables the deprecated system log functionality. Log data is written to the Logging API.'
-        systemLogLevel:
-            type: int
-            allowedValues:
-              '0': 'Severity: Info'
-              '1': 'Severity: Notice'
-              '2': 'Severity: Warning'
-              '3': 'Severity: Error'
-              '4': 'Severity: Fatal Error'
-            description: 'Enable the severity of log messages to be logged (see systemLog option) - Only messages with same or higher severity are logged.'
         UTF8filesystem:
             type: bool
             description: |
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-89645-RemovedSystemLogOptions.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-89645-RemovedSystemLogOptions.rst
new file mode 100644 (file)
index 0000000..5a48ae2
--- /dev/null
@@ -0,0 +1,29 @@
+.. include:: ../../Includes.txt
+
+=============================================
+Important: #89645 - Removed systemLog options
+=============================================
+
+See :issue:`89645`
+
+Description
+===========
+
+The systemLog API has been changed in TYPO3 v9.0 to use the Logging API as a breaking change. The relevant systemLog
+options have been kept in TYPO3 v9 for backwards-compatibility of existing extensions, however have no use in TYPO3 v10
+anymore.
+
+The affected options are:
+- :php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLog']`
+- :php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel']`
+
+Impact
+======
+
+The options have been removed from the TYPO3's default configuration. When the options have been set, they are
+automatically removed in TYPO3 v10.0 when accessing the Install Tool or System Maintenance area.
+
+For extension authors, the Logging API should be used starting with TYPO3 v9. The usage of the systemLog options
+should then be removed from the extensions' code.
+
+.. index:: LocalConfiguration, FullyScanned, ext:core
index 7f594cd..4dc0183 100644 (file)
@@ -30,6 +30,5 @@ class CustomPreset extends Configuration\AbstractCustomPreset implements Configu
         'FE/debug' => '',
         'SYS/devIPmask' => '',
         'SYS/displayErrors' => '',
-        'SYS/systemLogLevel' => '',
     ];
 }
index 5983eec..3ab15b1 100644 (file)
@@ -41,7 +41,6 @@ class DebugPreset extends Configuration\AbstractPreset
         'FE/debug' => true,
         'SYS/devIPmask' => '*',
         'SYS/displayErrors' => 1,
-        'SYS/systemLogLevel' => 0,
         // E_WARNING | E_RECOVERABLE_ERROR | E_DEPRECATED
         'SYS/exceptionalErrors' => 12290,
     ];
index 43e86e5..090d275 100644 (file)
@@ -41,7 +41,6 @@ class LivePreset extends Configuration\AbstractPreset
         'FE/debug' => false,
         'SYS/devIPmask' => '',
         'SYS/displayErrors' => 0,
-        'SYS/systemLogLevel' => 2,
         // E_RECOVERABLE_ERROR
         'SYS/exceptionalErrors' => 4096,
     ];
index ccdc1e4..45cfde7 100644 (file)
@@ -150,6 +150,9 @@ class SilentConfigurationUpgradeService
         'FE/get_url_id_token',
         // #88500
         'BE/RTE_imageStorageDir',
+        // #89645
+        'SYS/systemLog',
+        'SYS/systemLogLevel',
     ];
 
     public function __construct(ConfigurationManager $configurationManager = null)
index 5c6216f..9e0fa22 100644 (file)
@@ -321,4 +321,14 @@ return [
             'Breaking-88660-GLOBALST3_VARRemoved.rst',
         ],
     ],
+    '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'systemLog\']' => [
+        'restFiles' => [
+            'Important-89645-RemovedSystemLogOptions.rst',
+        ],
+    ],
+    '$GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'systemLogLevel\']' => [
+        'restFiles' => [
+            'Important-89645-RemovedSystemLogOptions.rst',
+        ],
+    ],
 ];
index 219273a..7a563a1 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","./Renderable/InfoBox","./Renderable/Severity","./Renderable/ProgressBar","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Icons"],function(e,t,o,a,s,n,l,i){"use strict";return new class{constructor(){this.selectorBody=".t3js-body",this.selectorMainContent=".t3js-module-body"}initialize(){this.registerInstallToolRoutes(),o(document).on("click",".t3js-login-lockInstallTool",e=>{e.preventDefault(),this.logout()}),o(document).on("click",".t3js-login-login",e=>{e.preventDefault(),this.login()}),o(document).on("keydown","#t3-install-form-password",e=>{13===e.keyCode&&(e.preventDefault(),o(".t3js-login-login").click())}),o(document).on("click",".card .btn",t=>{t.preventDefault();const a=o(t.currentTarget),s=a.data("require"),n=a.data("inline");if(void 0!==n&&1===parseInt(n,10))e([s],e=>{e.initialize(a)});else{const t=a.closest(".card").find(".card-title").html(),n=a.data("modalSize")||l.sizes.large;i.getIcon("spinner-circle",i.sizes.default,null,null,i.markupIdentifiers.inline).done(a=>{const i={type:l.types.default,title:t,size:n,content:o('<div class="modal-loading">').append(a),additionalCssClasses:["install-tool-modal"],callback:t=>{e([s],e=>{e.initialize(t)})}};l.advanced(i)})}}),"backend"===o(this.selectorBody).data("context")?this.executeSilentConfigurationUpdate():this.preAccessCheck()}registerInstallToolRoutes(){void 0===TYPO3.settings&&(TYPO3.settings={ajaxUrls:{icons:"?install[controller]=icon&install[action]=getIcon",icons_cache:"?install[controller]=icon&install[action]=getCacheIdentifier"}})}getUrl(e,t){const a=o(this.selectorBody).data("context");let s=location.href;return s=s.replace(location.search,""),void 0===t&&(t=o(this.selectorBody).data("controller")),s=s+"?install[controller]="+t,void 0!==a&&""!==a&&(s=s+"&install[context]="+a),void 0!==e&&(s=s+"&install[action]="+e),s}executeSilentConfigurationUpdate(){this.updateLoadingInfo("Checking session and executing silent configuration update"),o.ajax({url:this.getUrl("executeSilentConfigurationUpdate","layout"),cache:!1,success:e=>{!0===e.success?this.executeSilentExtensionConfigurationSynchronization():this.executeSilentConfigurationUpdate()},error:e=>{this.handleAjaxError(e)}})}executeSilentExtensionConfigurationSynchronization(){const e=o(this.selectorBody);this.updateLoadingInfo("Executing silent extension configuration synchronization"),o.ajax({url:this.getUrl("executeSilentExtensionConfigurationSynchronization","layout"),cache:!1,success:t=>{if(!0===t.success)this.loadMainLayout();else{const t=a.render(s.error,"Something went wrong","");e.empty().append(t)}},error:e=>{this.handleAjaxError(e)}})}loadMainLayout(){const e=o(this.selectorBody);this.updateLoadingInfo("Loading main layout"),o.ajax({url:this.getUrl("mainLayout","layout"),cache:!1,success:t=>{if(!0===t.success&&"undefined"!==t.html&&t.html.length>0){if(e.empty().append(t.html),"backend"!==o(this.selectorBody).data("context")){const t=e.data("controller");e.find('.t3js-mainmodule[data-controller="'+t+'"]').addClass("active")}this.loadCards()}else{const t=a.render(s.error,"Something went wrong","");e.empty().append(t)}},error:e=>{this.handleAjaxError(e)}})}handleAjaxError(e,t){let n;if(403===e.status)"backend"===o(this.selectorBody).data("context")?(n=a.render(s.error,"The install tool session expired. Please reload the backend and try again."),o(this.selectorBody).empty().append(n)):this.checkEnableInstallToolFile();else{const a=this.getUrl(void 0,"upgrade");n=o('<div class="t3js-infobox callout callout-sm callout-danger"><div class="callout-body"><p>Something went wrong. Please use <b><a href="'+a+'">Check for broken extensions</a></b> to see if a loaded extension breaks this part of the install tool and unload it.</p><p>The box below may additionally reveal further details on what went wrong depending on your debug settings. It may help to temporarily switch to debug mode using <b>Settings > Configuration Presets > Debug settings.</b></p><p>If this error happens at an early state and no full exception back trace is shown, it may also help to manually increase debugging output in <code>typo3conf/LocalConfiguration.php</code>:<code>[\'BE\'][\'debug\'] => true</code>, <code>[\'SYS\'][\'devIPmask\'] => \'*\'</code>, <code>[\'SYS\'][\'displayErrors\'] => 1</code>,<code>[\'SYS\'][\'systemLogLevel\'] => 0</code>, <code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p></div></div><div class="panel-group" role="tablist" aria-multiselectable="true"><div class="panel panel-default panel-flat searchhit"><div class="panel-heading" role="tab" id="heading-error"><h3 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-error" aria-expanded="true" aria-controls="collapse-error" class="collapsed"><span class="caret"></span><strong>Ajax error</strong></a></h3></div><div id="collapse-error" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-error"><div class="panel-body">'+e.responseText+"</div></div></div></div>"),void 0!==t?o(t).empty().html(n):o(this.selectorBody).empty().html(n)}}checkEnableInstallToolFile(){o.ajax({url:this.getUrl("checkEnableInstallToolFile"),cache:!1,success:e=>{!0===e.success?this.checkLogin():this.showEnableInstallTool()},error:e=>{this.handleAjaxError(e)}})}showEnableInstallTool(){o.ajax({url:this.getUrl("showEnableInstallToolFile"),cache:!1,success:e=>{!0===e.success&&o(this.selectorBody).empty().append(e.html)},error:e=>{this.handleAjaxError(e)}})}checkLogin(){o.ajax({url:this.getUrl("checkLogin"),cache:!1,success:e=>{!0===e.success?this.loadMainLayout():this.showLogin()},error:e=>{this.handleAjaxError(e)}})}showLogin(){o.ajax({url:this.getUrl("showLogin"),cache:!1,success:e=>{!0===e.success&&o(this.selectorBody).empty().append(e.html)},error:e=>{this.handleAjaxError(e)}})}login(){const e=o(".t3js-login-output"),t=n.render(s.loading,"Loading...","");e.empty().html(t),o.ajax({url:this.getUrl(),cache:!1,method:"POST",data:{install:{action:"login",token:o("[data-login-token]").data("login-token"),password:o(".t3-install-form-input-text").val()}},success:t=>{!0===t.success?this.executeSilentConfigurationUpdate():t.status.forEach(t=>{const o=a.render(t.severity,t.title,t.message);e.empty().html(o)})},error:e=>{this.handleAjaxError(e)}})}logout(){o.ajax({url:this.getUrl("logout"),cache:!1,success:e=>{!0===e.success&&this.showEnableInstallTool()},error:e=>{this.handleAjaxError(e)}})}loadCards(){const e=o(this.selectorMainContent);o.ajax({url:this.getUrl("cards"),cache:!1,success:t=>{if(!0===t.success&&"undefined"!==t.html&&t.html.length>0)e.empty().append(t.html);else{const t=a.render(s.error,"Something went wrong","");e.empty().append(t)}},error:e=>{this.handleAjaxError(e)}})}updateLoadingInfo(e){o(this.selectorBody).find("#t3js-ui-block-detail").text(e)}preAccessCheck(){this.updateLoadingInfo("Execute pre access check"),o.ajax({url:this.getUrl("preAccessCheck","layout"),cache:!1,success:e=>{e.installToolLocked?this.checkEnableInstallToolFile():e.isAuthorized?this.executeSilentConfigurationUpdate():this.showLogin()},error:e=>{this.handleAjaxError(e)}})}}});
\ No newline at end of file
+define(["require","exports","jquery","./Renderable/InfoBox","./Renderable/Severity","./Renderable/ProgressBar","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Icons"],function(e,t,o,a,s,n,l,i){"use strict";return new class{constructor(){this.selectorBody=".t3js-body",this.selectorMainContent=".t3js-module-body"}initialize(){this.registerInstallToolRoutes(),o(document).on("click",".t3js-login-lockInstallTool",e=>{e.preventDefault(),this.logout()}),o(document).on("click",".t3js-login-login",e=>{e.preventDefault(),this.login()}),o(document).on("keydown","#t3-install-form-password",e=>{13===e.keyCode&&(e.preventDefault(),o(".t3js-login-login").click())}),o(document).on("click",".card .btn",t=>{t.preventDefault();const a=o(t.currentTarget),s=a.data("require"),n=a.data("inline");if(void 0!==n&&1===parseInt(n,10))e([s],e=>{e.initialize(a)});else{const t=a.closest(".card").find(".card-title").html(),n=a.data("modalSize")||l.sizes.large;i.getIcon("spinner-circle",i.sizes.default,null,null,i.markupIdentifiers.inline).done(a=>{const i={type:l.types.default,title:t,size:n,content:o('<div class="modal-loading">').append(a),additionalCssClasses:["install-tool-modal"],callback:t=>{e([s],e=>{e.initialize(t)})}};l.advanced(i)})}}),"backend"===o(this.selectorBody).data("context")?this.executeSilentConfigurationUpdate():this.preAccessCheck()}registerInstallToolRoutes(){void 0===TYPO3.settings&&(TYPO3.settings={ajaxUrls:{icons:"?install[controller]=icon&install[action]=getIcon",icons_cache:"?install[controller]=icon&install[action]=getCacheIdentifier"}})}getUrl(e,t){const a=o(this.selectorBody).data("context");let s=location.href;return s=s.replace(location.search,""),void 0===t&&(t=o(this.selectorBody).data("controller")),s=s+"?install[controller]="+t,void 0!==a&&""!==a&&(s=s+"&install[context]="+a),void 0!==e&&(s=s+"&install[action]="+e),s}executeSilentConfigurationUpdate(){this.updateLoadingInfo("Checking session and executing silent configuration update"),o.ajax({url:this.getUrl("executeSilentConfigurationUpdate","layout"),cache:!1,success:e=>{!0===e.success?this.executeSilentExtensionConfigurationSynchronization():this.executeSilentConfigurationUpdate()},error:e=>{this.handleAjaxError(e)}})}executeSilentExtensionConfigurationSynchronization(){const e=o(this.selectorBody);this.updateLoadingInfo("Executing silent extension configuration synchronization"),o.ajax({url:this.getUrl("executeSilentExtensionConfigurationSynchronization","layout"),cache:!1,success:t=>{if(!0===t.success)this.loadMainLayout();else{const t=a.render(s.error,"Something went wrong","");e.empty().append(t)}},error:e=>{this.handleAjaxError(e)}})}loadMainLayout(){const e=o(this.selectorBody);this.updateLoadingInfo("Loading main layout"),o.ajax({url:this.getUrl("mainLayout","layout"),cache:!1,success:t=>{if(!0===t.success&&"undefined"!==t.html&&t.html.length>0){if(e.empty().append(t.html),"backend"!==o(this.selectorBody).data("context")){const t=e.data("controller");e.find('.t3js-mainmodule[data-controller="'+t+'"]').addClass("active")}this.loadCards()}else{const t=a.render(s.error,"Something went wrong","");e.empty().append(t)}},error:e=>{this.handleAjaxError(e)}})}handleAjaxError(e,t){let n;if(403===e.status)"backend"===o(this.selectorBody).data("context")?(n=a.render(s.error,"The install tool session expired. Please reload the backend and try again."),o(this.selectorBody).empty().append(n)):this.checkEnableInstallToolFile();else{const a=this.getUrl(void 0,"upgrade");n=o('<div class="t3js-infobox callout callout-sm callout-danger"><div class="callout-body"><p>Something went wrong. Please use <b><a href="'+a+'">Check for broken extensions</a></b> to see if a loaded extension breaks this part of the install tool and unload it.</p><p>The box below may additionally reveal further details on what went wrong depending on your debug settings. It may help to temporarily switch to debug mode using <b>Settings > Configuration Presets > Debug settings.</b></p><p>If this error happens at an early state and no full exception back trace is shown, it may also help to manually increase debugging output in <code>typo3conf/LocalConfiguration.php</code>:<code>[\'BE\'][\'debug\'] => true</code>, <code>[\'SYS\'][\'devIPmask\'] => \'*\'</code>, <code>[\'SYS\'][\'displayErrors\'] => 1</code>,<code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p></div></div><div class="panel-group" role="tablist" aria-multiselectable="true"><div class="panel panel-default panel-flat searchhit"><div class="panel-heading" role="tab" id="heading-error"><h3 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-error" aria-expanded="true" aria-controls="collapse-error" class="collapsed"><span class="caret"></span><strong>Ajax error</strong></a></h3></div><div id="collapse-error" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-error"><div class="panel-body">'+e.responseText+"</div></div></div></div>"),void 0!==t?o(t).empty().html(n):o(this.selectorBody).empty().html(n)}}checkEnableInstallToolFile(){o.ajax({url:this.getUrl("checkEnableInstallToolFile"),cache:!1,success:e=>{!0===e.success?this.checkLogin():this.showEnableInstallTool()},error:e=>{this.handleAjaxError(e)}})}showEnableInstallTool(){o.ajax({url:this.getUrl("showEnableInstallToolFile"),cache:!1,success:e=>{!0===e.success&&o(this.selectorBody).empty().append(e.html)},error:e=>{this.handleAjaxError(e)}})}checkLogin(){o.ajax({url:this.getUrl("checkLogin"),cache:!1,success:e=>{!0===e.success?this.loadMainLayout():this.showLogin()},error:e=>{this.handleAjaxError(e)}})}showLogin(){o.ajax({url:this.getUrl("showLogin"),cache:!1,success:e=>{!0===e.success&&o(this.selectorBody).empty().append(e.html)},error:e=>{this.handleAjaxError(e)}})}login(){const e=o(".t3js-login-output"),t=n.render(s.loading,"Loading...","");e.empty().html(t),o.ajax({url:this.getUrl(),cache:!1,method:"POST",data:{install:{action:"login",token:o("[data-login-token]").data("login-token"),password:o(".t3-install-form-input-text").val()}},success:t=>{!0===t.success?this.executeSilentConfigurationUpdate():t.status.forEach(t=>{const o=a.render(t.severity,t.title,t.message);e.empty().html(o)})},error:e=>{this.handleAjaxError(e)}})}logout(){o.ajax({url:this.getUrl("logout"),cache:!1,success:e=>{!0===e.success&&this.showEnableInstallTool()},error:e=>{this.handleAjaxError(e)}})}loadCards(){const e=o(this.selectorMainContent);o.ajax({url:this.getUrl("cards"),cache:!1,success:t=>{if(!0===t.success&&"undefined"!==t.html&&t.html.length>0)e.empty().append(t.html);else{const t=a.render(s.error,"Something went wrong","");e.empty().append(t)}},error:e=>{this.handleAjaxError(e)}})}updateLoadingInfo(e){o(this.selectorBody).find("#t3js-ui-block-detail").text(e)}preAccessCheck(){this.updateLoadingInfo("Execute pre access check"),o.ajax({url:this.getUrl("preAccessCheck","layout"),cache:!1,success:e=>{e.installToolLocked?this.checkEnableInstallToolFile():e.isAuthorized?this.executeSilentConfigurationUpdate():this.showLogin()},error:e=>{this.handleAjaxError(e)}})}}});
\ No newline at end of file