Document three undocumented 5.0 behaviors (state, serialization, errors) - #2336
Merged
Merged
Conversation
soyuka
force-pushed
the
docs/5.0-state-sti-errors
branch
from
September 13, 2026 07:41
67444f7 to
fd7aca5
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
Three undocumented API Platform 5.0-only behaviour changes, verified against
api-platform/coreatupstream/main:core/state-providers.md— aParameterProviderInterfaceon auriVariablesLinkcan now replace the URI variable value used to fetch the resource (core #8491, commitfce2bdfe6). Documents the default transform-and-replace behaviour and thePreservesUriVariableInterface/write_uri_variableopt-out used byReadLinkParameterProvider.core/serialization.md— for DoctrineJOINED/SINGLE_TABLEinheritance, a serializer group declared only on a discriminator subclass is now taken into account when deciding whether a relation is embedded (core #8283, commita8af8e1b9). This is a behaviour change for existing APIs: relations that used to serialize as an IRI may now be embedded. Documents the rule and thereadableLink/writableLink: falseopt-out to keep the old behaviour.core/errors.md— the defaultexception_to_statusmapping was undocumented and the shipped Symfony config sample had drifted from the source (wrongInvalidArgumentExceptionnamespace, a nonexistentValidationExceptionInterfaceclass). Reconciled againstConfiguration::addExceptionToStatusSection():SerializerExceptionInterface => 400,InvalidArgumentException => 400,OptimisticLockException => 409, and the newUniqueConstraintViolationException => 422(core #8478).Each claim was checked directly against the shipped PHP source (see commit messages for file:line references), not copied from the audit prose.
Not fixed (out of scope, flagged for follow-up)
core/errors.md's Laravelexception_to_statusexample still lists a mismatched default set (ExceptionInterface,InvalidArgumentException, phantomValidationExceptionInterface) that doesn't match Laravel's actual shipped default (Illuminate\Auth\AuthenticationException => 401,Illuminate\Auth\Access\AuthorizationException => 403, seesrc/Laravel/config/api-platform.php:116-119). Left untouched — unrelated to the Doctrine/UniqueConstraintViolationExceptionscope of this PR and would need its own verification pass.Test plan
npx prettier@3.9.5 --check "**/*.md" --prose-wrap always— only pre-existing failures incore/doctrine-filters.mdandcore/filters.mdremain (untouched by this PR).