As one can read in the Laravel documentation, the following warning is stated:
The mergeWhen method should not be used within arrays that mix string and numeric keys. Furthermore, it should not be used within arrays with numeric keys that are not ordered sequentially.
However, I have tested this on my local machine and the method seems to behave like normal.
Thus this warning only leaves me wondering; why? Is this for security reasons? Performance? Maintainability? Or just some edge cases where the method does not behave correctly?
Digging further, looking at the Laravel Documentation with GitHub blame the warning seems to have been added by Taylor Otwell himself during an initial pass at the documentation, leaving me with no additional clues.