Skip to content

fix(serializer): unwrap the collection key type instead of looping forever - #8764

Draft
Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/serializer-collection-key-type-loop
Draft

Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/serializer-collection-key-type-loop

Conversation

@Maxcastel

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
License MIT

One-character bug: the loop that unwraps the key type of a collection called $type->getWrappedType() instead of $collectionKeyType->getWrappedType(). With a wrapping key type, for instance

/** @template TKey of array-key */
class Shelf {
  /** @var array<TKey, Book> */
  public array $books = [];
}

denormalizing books never ends.

@Maxcastel
Maxcastel changed the base branch from main to 5.0 October 23, 2026 15:18
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.

1 participant