Ensure primary resources are returned in the correct order
This commit is contained in:
parent
606a79a0cf
commit
4a001556d8
|
|
@ -242,7 +242,9 @@ final class Serializer
|
|||
|
||||
public function primary(): array
|
||||
{
|
||||
$primary = array_values(array_intersect_key($this->map, array_flip($this->primary)));
|
||||
$primary = array_map(function ($key) {
|
||||
return $this->map[$key];
|
||||
}, $this->primary);
|
||||
|
||||
return $this->resourceObjects($primary);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue