Deprecation: #110285 - DataHandler->setCorrelationId()
See forge#110285
Description
The method
\TYPO3\ has been
marked as deprecated and will be removed in TYPO3 v16.0.
The correlation id of a DataHandler operation can now be handed over directly
to
Data as fifth argument. This also ensures that the
correlation id is passed on to internally spawned sub instances of the
DataHandler, so all record history entries of one logical operation share the
same correlation scope. Setting the correlation id via the setter after
start did not propagate it to sub instances and is therefore
superseded.
Impact
Calling
Data triggers a PHP
E_ error.
The extension scanner detects usages of the deprecated method as weak match.
Affected installations
All installations with custom extensions calling
Data, usually to group the record history
entries of one logical operation. This is a rarely used API method.
Migration
Pass the
\TYPO3\ instance
directly to
Data instead:
// Before
$dataHandler->start($dataMap, $commandMap);
$dataHandler->setCorrelationId($myCorrelationId);
$dataHandler->process_datamap();
// After
$dataHandler->start($dataMap, $commandMap, correlationId: $myCorrelationId);
$dataHandler->process_datamap();