joinTSarrays() is array_replace_recursive
\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::joinTSarrays can be replaced by the PHP native array_replace_recursive().
array_replace_recursive() replaces the values of array1 with the same values from all the following arrays. If a key from the first array exists in the second array, its value will be replaced by the value from the second array. If the key exists in the second array, and not the first, it will be created in the first array. If a key only exists in the first array, it will be left as is. If several arrays are passed for replacement, they will be processed in order, the later array overwriting the previous values.
array_replace_recursive() is recursive : it will recurse into arrays and apply the same process to the inner value.
That is exactly what the joinTSarrays() does.
I think we should replace the calls with straight up array_replace_recursive() and deprecate joinTSarrays()
joinTSarrays() both overwrites the $conf values with anything in the $old_conf and also creates any elements not present in $conf with new values from $old_conf. So they are functionally identical.
[TASK] joinTSarrays() is replaced by array_replace_recursive()
replaced by the PHP native array_replace_recursive() (added in PHP 5.3.0)
which does exactly the same and is twice as fast.
Usage of $cObj->joinTSarrays() is deprecated.