Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: properly handle nested unresolvable type during mapping #503

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

romm
Copy link
Member

@romm romm commented Mar 27, 2024

This change brings two enhancements:

  • When mapping to a structure that contains a nested unresolvable type, for instance a doc-block type that does not match the native type, the mapper will detect it and throw a proper exception (it used to just crash on a badly designed assertion).
  • Unresolvable types that are not used during mapping, for instance parameters of methods that are not used by the mapper will no longer throw an exception even if not needed by the library. Instead, an unresolvable type is assigned to these invalid properties/parameters/ return types.

This change brings two enhancements:

- When mapping to a structure that contains a nested unresolvable type,
  for instance a doc-block type that does not match the native type, the
  mapper will detect it and throw a proper exception (it used to just
  crash on a badly designed assertion).
- Unresolvable types that are not used during mapping, for instance
  parameters of methods that are not used by the mapper will no longer
  throw an exception even if not needed by the library. Instead, an
  unresolvable type is assigned to these invalid properties/parameters/
  return types.
@romm romm merged commit 1947061 into CuyZ:master Mar 27, 2024
11 checks passed
@romm romm deleted the fix/map-unresolvable-type branch March 27, 2024 12:51
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