Skip to content

fix(serializer): unwrap the collection key type, not the collection type - #8780

Merged
soyuka merged 2 commits into
api-platform:5.0from
BenMacha:fix-denormalize-collection-key-type-5-0
Nov 3, 2026
Merged

soyuka merged 2 commits into
api-platform:5.0from
BenMacha:fix-denormalize-collection-key-type-5-0

Conversation

@BenMacha

@BenMacha BenMacha commented Nov 1, 2026

Copy link
Copy Markdown
Q A
Branch? 5.0
Tickets
License MIT
Doc PR

In denormalizeObjectCollection(), the loop unwrapping the collection key type called $type->getWrappedType() instead of $collectionKeyType->getWrappedType(): with a wrapping key type (e.g. a nullable int), it never ended.

Test: AbstractItemNormalizerTest::testDenormalizeBadWrappedKeyType.

When the key type of an object collection was a wrapping type (e.g. a
nullable int), denormalizeObjectCollection() unwrapped the collection type
instead of the key type, getting the same generic type back forever and
hanging the request in an infinite loop.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-01T08:06:05.508582Z
We couldn’t complete this review. Comment @codex review to try again.
7098529 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@soyuka
soyuka merged commit 33b2bb0 into api-platform:5.0 Nov 3, 2026
116 of 117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants