Skip to content

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

Open
soyuka wants to merge 1 commit into
api-platform:4.3from
soyuka:fix/borrowed-route-iri-8503
Open

fix(serializer): resolve IRIs on borrowed routes#8521
soyuka wants to merge 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
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