Skip to content

fix(serializer): resolve IRIs on borrowed routes - #8521

Merged
soyuka merged 1 commit into
api-platform:4.3from
soyuka:fix/borrowed-route-iri-8503
Sep 11, 2026
Merged

fix(serializer): resolve IRIs on borrowed routes#8521
soyuka merged 1 commit into
api-platform:4.3from
soyuka:fix/borrowed-route-iri-8503

Conversation

@soyuka

@soyuka soyuka commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

A resource operation that borrows another resource's route with routeName now resolves relation IRIs through the borrowing resource's operation and provider.

Reproduction

A CategoryProjection borrowing CategoryResource's item route was emitted as /shared_iri/categories/1, then rejected as an invalid IRI when posted to a CategoryProjection relation.

Test plan

  • Added a functional round-trip test for the borrowed route IRI.
  • Added a test confirming unrelated resource IRIs remain rejected.
  • Focused functional tests pass.

Fixes #8503

Dispatch relation IRIs through the expected resource operation when it explicitly borrows the matched route. Keep unrelated route owners subject to the existing type guard.

Fixes api-platform#8503
@soyuka
soyuka merged commit fe30b61 into api-platform:4.3 Sep 11, 2026
110 of 112 checks passed
soyuka added a commit that referenced this pull request Sep 11, 2026
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