getPatch with REARRANGE_ARRAYS is not returning the correct paths when items are removed from an array
TEST
$previous = ['Apples', 'Oranges', 'Bananas', 'Grapes'];
$current = ['Apples', 'Grapes'];
$JsonDiff = new JsonDiff($previous, $current, JsonDiff::REARRANGE_ARRAYS);
$patch = json_decode(json_encode($JsonDiff->getPatch()), true) ?: [];
print_r($patch);
EXPECTED RESULT
When the [1] and [2] position items in the array are successfully removed the patch accurately reflects this
Array ( [0] => Array ( [op] => remove [path] => /1 ) [1] => Array ( [op] => remove [path] => /2) )
ACTUAL RESULT
When [1] and [2] position items in the array are successfully removed the patch only reflects the first item and it's repeated twice. There is no reference to the second item anywhere in the patch response
Array ( [0] => Array ( [op] => remove [path] => /1 ) [1] => Array ( [op] => remove [path] => /1) )
Looks like this issue was fixed in this commit but for some reason it's not made it to master https://github.com/swaggest/json-diff/commit/74a30409254895d216ab27d10bba166558604a3d