diff --git a/packages/framework/src/Framework/Features/Publications/Models/PublicationType.php b/packages/framework/src/Framework/Features/Publications/Models/PublicationType.php index d5539d50929..14930ab3b29 100644 --- a/packages/framework/src/Framework/Features/Publications/Models/PublicationType.php +++ b/packages/framework/src/Framework/Features/Publications/Models/PublicationType.php @@ -204,9 +204,8 @@ protected function getPublicationsSortedByPaginationField(): Collection protected function parseFieldData(array $fields): Collection { - // FIXME check if we actually need the named key, as that adds complexity and the need to call ->values() - return Collection::make($fields)->mapWithKeys(function (array $data): array { - return [$data['name'] => new PublicationFieldDefinition(...$data)]; + return Collection::make($fields)->map(function (array $data): PublicationFieldDefinition { + return new PublicationFieldDefinition(...$data); }); }