Deprecation: #107550 - Table Garbage Collection Task configuration via $GLOBALS
See forge#107550
Description
The
Table
has been migrated to use TYPO3's native
TCA-based task configuration system. As part of this migration, the previous
configuration method using
$GLOBALS
has been deprecated and will be removed in TYPO3 v15.
Impact
Using the old configuration method will trigger a PHP deprecation warning. The functionality continues to work for now, with the deprecated configuration being merged with the new TCA-based configuration automaticcaly.
Affected installations
Any installation that configures custom tables for the
Table
using the
$GLOBALS
configuration.
The extension scanner will report any usage as weak match.
Migration
Instead of configuring tables via
$GLOBALS
, tables
should now be configured in TCA using the
task
configuration of the
corresponding record type within Configuration/
:
Before (deprecated):
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['options']['tables']['tx_myextension_my_table'] = [
'dateField' => 'tstamp',
'expirePeriod' => 90,
];
After (new method):
if (isset($GLOBALS['TCA']['tx_scheduler_task'])) {
$GLOBALS['TCA']['tx_scheduler_task']['types'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['taskOptions']['tables']['tx_myextension_my_table'] = [
'dateField' => 'tstamp',
'expirePeriod' => 90,
];
}
It is also possible to modify the tables added by TYPO3, for example changing the
expire
of
sys_
:
if (isset($GLOBALS['TCA']['tx_scheduler_task'])) {
$GLOBALS['TCA']['tx_scheduler_task']['types'][\TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask::class]['taskOptions']['tables']['sys_log']['expirePeriod'] = 240;
}
The new TCA-based configuration provides the same functionality while integrating better with TYPO3's native scheduler task system and FormEngine.