From 6543aa31699309e2bc574749c8c980c6f8adb26c Mon Sep 17 00:00:00 2001
From: Stephan Bauer <stephan_bauer@gmx.de>
Date: Fri, 27 Aug 2021 22:15:56 +0000
Subject: [PATCH] [DOCS] Fix scheduler garbage collection task example

Existing configuration should not be overwritten
when adding new table options.

Releases: master
Resolves: #95019
Change-Id: Ie45619e9539e055ef99af1d7cec8cb80b6ed8bde
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70802
Tested-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../Installation/BaseTasks/Index.rst             | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/typo3/sysext/scheduler/Documentation/Installation/BaseTasks/Index.rst b/typo3/sysext/scheduler/Documentation/Installation/BaseTasks/Index.rst
index f366aaffef5f..d961917bf772 100644
--- a/typo3/sysext/scheduler/Documentation/Installation/BaseTasks/Index.rst
+++ b/typo3/sysext/scheduler/Documentation/Installation/BaseTasks/Index.rst
@@ -67,15 +67,13 @@ Example
 
 ::
 
-   $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables'] = array(
-           'tx_realurl_errorlog' => array(
-                   'dateField' => 'tstamp',
-                   'expirePeriod' => '180'
-           ),
-           'tx_realurl_uniqalias' => array(
-                   'expireField' => 'expire'
-           )
-   );
+   $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['tx_realurl_errorlog'] = [
+      'dateField' => 'tstamp',
+      'expirePeriod' => '180',
+   ];
+   $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['tx_realurl_uniqalias'] = [
+      'expireField' => 'expire',
+   ];
 
 The first part of the configuration indicates that records older than
 180 days should be removed from table :code:`tx_realurl_errorlog` ,
-- 
GitLab