Closed lolaslade closed 5 years ago
The issue was in the Indexable trait. The problem was that array_intersect_key was not preserving the order of the keys so that $old was indexed in one order and $items in another. Since you are no longer using traits I guess this should just be closed but I will post the solution in case anyone else is using this.
This is a fix:
$keyParts = array_intersect_key($item, $keys);
asort($keyParts);
$key = implode('', $keyParts);
I'm not using this trait anymore on master branch, but master is currently a work in progress of v2. I'll take a look at this bug and in your features requests.
Thanks for the library. It is making my code very readable! I am using v1.1. I can't use the latest master due to PHP version constraints just yet. With the code below I am getting duplicates after the job runs multiple times.