feat(jsonapi)!: default use_iri_as_id to false - #8512
Merged
soyuka merged 2 commits intoSep 11, 2026
Merged
Conversation
Maxcastel
force-pushed
the
feat/jsonapi-use-iri-as-id-default-false
branch
from
September 8, 2026 13:28
62280d4 to
2963b38
Compare
Maxcastel
force-pushed
the
feat/jsonapi-use-iri-as-id-default-false
branch
from
September 8, 2026 13:37
2963b38 to
8254e07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follows up on the deprecation introduced in #8327, which announced this change for 5.0:
api_platform.jsonapi.use_iri_as_idnow defaults tofalseinstead of resolving totruewith a deprecation. Theidmember carries the resource identifier and the IRI moves tolinks.self, which is where JSON:API conventionally expects a resource URL.Before
{ "data": { "id": "/books/10", "type": "Book" } }After
{ "data": { "id": "10", "type": "Book", "links": { "self": "/books/10" } } }Keeping the previous behavior
Symfony
Laravel
Changes
Configuration:use_iri_as_idisdefaultFalse()instead ofdefaultNull()ApiPlatformExtension: drops the 4.4 deprecation and thetruefallbackfalse, so both integrations agreeJsonApiUseIriAsIdDeprecationTestis renamed toJsonApiUseIriAsIdTestand now asserts that an unset option resolves tofalsedata.id(config_common.ymlon the Symfony side,JsonApiTeston the Laravel side) now setuse_iri_as_id: trueexplicitly, so both modes stay covered:IriModeTestfortrue,IdentifierModeTest(thejsonapienvironment) for the new defaultBC break
Apps that never set the option explicitly will see JSON:API
data.idchange from the IRI to the scalar identifier. Settinguse_iri_as_id: truerestores the old payload.