docs: add API Platform 4.4 to 5.0 upgrade guide - #2330
Merged
Conversation
soyuka
force-pushed
the
docs/upgrade-guide-5.0
branch
from
September 13, 2026 08:01
0425ea6 to
c31306e
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
## API Platform 4.4 to 5.0section tocore/upgrade-guide.md(was entirely absent — 0/10 breaking-change coverage per the docs audit).api-platform/coreatupstream/main(the shipped PHP source, not just CHANGELOG prose) and againstCHANGELOG.md'sv5.0.0-beta.1entry.What's covered (Breaking Changes)
use_iri_as_idnow defaults tofalse— before/after payload, Symfony + Laravel opt-out, cross-link tojsonapi.md.DeserializeProviderconstructor:TranslatorInterface4th arg dropped,DenormalizationViolationFactoryInterfacemoves 5th → 4th;api-platform/stateno longer requiressymfony/translation-contracts.Request::getContentType()fallbacks dropped (core#8517) — internal, tied to the^7.4 || ^8.0floor.core#8367removed-API batch: config keys (query_parameter_validation,enable_link_security,resource_class_directories,graphql_playground,varnish_urls,xkey),ObjectMapperProcessorsplit into Input/Output processors,DefinitionNameFactory's$distinctFormatsarg,ValidationException's string-message ctor,ApiTestCase::$alwaysBootKerneldefault, automatic short-name deduplication, and the now-explicitapi_assign_object_to_populatecontext flag.Typesystem removed forsymfony/type-info(core#8364):ApiProperty::$builtinTypes/getBuiltinTypes()/withBuiltinTypes()→nativeType; GraphQLTypeConverterInterface::getType()→convertPhpType();ContextAwareTypeBuilderInterface::isCollection()removed.PropertyAwareFilterInterface::getProperties()now a real interface method; JSON:API errorstatusis now a string (core#8366)./contexts/Errorand/contexts/ConstraintViolationListno longer special-cased;SerializerContextBuilderno longer injectsuri_variables(core#8402).UniqueConstraintViolationException→ 422 by default (core#8478).ComparisonFiltergains[between],RangeFilterdeprecated (removed in 6.0),DateFilter/ExistsFilterbecome standalone — kept short, cross-linked todoctrine-filters.md(owned by another in-flight PR).CompatibleValueResolverInterfaceremoved;PayloadArgumentResolverimplementsValueResolverInterfacedirectly.Deprecations
FilterInterface::getDescription()removal explicitly stated as deferred to 6.0 (core#8513) — it is NOT removed in 5.0, along with#[ApiFilter]/Operation::$filters/AbstractFilter.Notes
ApiTestCasemoved toapi-platform/test(full treatment left to feat: extract ApiTestCase in its own api-platform/test package #2276, already in flight).Corrections vs. the source task list
MetadataCollectionFactoryTrait::deduplicateShortNames()(core commite22e74464) that thededuplicate_resource_short_namesopt-in flag and its deprecation path are removed, making deduplication unconditional. Phrased it that way rather than as an outright removal.Configuration.php:validator.query_parameter_validation,graphql.graphql_playground,http_cache.invalidation.varnish_urls,http_cache.invalidation.xkey(nested), vs. root-levelenable_link_securityandresource_class_directories.assign_object_to_populate: the 5.0 change removesDeserializeProvider's own HTTP-method-based fallback (verified in commite22e74464's diff ofDeserializeProvider.php); the flag is instead set upstream byMainController/DeserializeListener(Symfony) andApiPlatformController(Laravel), confirmed by commit58f28b8e7.Left out / not verified
core/jsonapi.md:11("This will become the default in 5.x") even though it's now stale/wrong per this change (W6 in the audit) — out of scope for this PR (edits limited tocore/upgrade-guide.md).doctrine-filters.mdfilter migration content — another PR owns that page.Test plan
npx prettier@3.9.5 --check core/upgrade-guide.md --prose-wrap alwayspasses.npx prettier@3.9.5 --check "**/*.md" --prose-wrap alwaysshows only 2 pre-existing failures (core/doctrine-filters.md,core/filters.md), confirmed present onupstream/mainbefore this change (unrelated, out of scope).