Skip to content

Commit 81f4cfb

Browse files
committed
Revert the behaviour of handling duplicate items
1 parent 2aa29fb commit 81f4cfb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.7.4] - 2018-06-20
8+
9+
### Fixed
10+
11+
* Reverted the behaviour of handling duplicate items back to what it was in <= 0.7.2. This change in behaviour was introduced in the last performance update (0.7.3). N.B. This change will only affect you if you parse documents with duplicate items, which violates the JSON API spec.
12+
713
## [0.7.3] - 2018-06-01
814

915
### Changed

src/JsonApi/Hydrator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function hydrateCollection(ResourceCollectionInterface $jsonApiCollection
6767
*/
6868
public function hydrateRelationships(Collection $jsonApiItems, Collection $items)
6969
{
70-
$keyedItems = $items->keyBy(
70+
$keyedItems = $items->reverse()->keyBy(
7171
function (ItemInterface $item) {
7272
return $this->getItemKey($item);
7373
}

0 commit comments

Comments
 (0)