Deprecation: #94137 - Switch behavior of ArrayUtility::arrayDiffAssocRecursive()

See forge#94137

Description

Despite its name, the method \TYPO3\CMS\Core\Utility\ArrayUtility::arrayDiffAssocRecursive() mimics the behavior of array_diff_key() and not of array_diff_assoc().

Impact

The method has been adjusted to act like array_diff_assoc(). As this is considered being a breaking change, the behavior must be enabled explicitly by passing a third parameter $useArrayDiffAssocBehavior being true. If the argument is either omitted or false, the old behavior is kept but a deprecation warning will be thrown.

Affected Installations

Every 3rd party extension using \TYPO3\CMS\Core\Utility\ArrayUtility::arrayDiffAssocRecursive() without its third argument being true is affected.

Migration

To keep the previous array_diff_key() based behavior, use the introduced method \TYPO3\CMS\Core\Utility\ArrayUtility::arrayDiffKeyRecursive(). To make use of the array_diff_assoc() based behavior, which will become the default behavior in TYPO3 v12, pass true as the third argument.