Skip to content

docs: add API Platform 4.4 to 5.0 upgrade guide - #2330

Merged
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:docs/upgrade-guide-5.0
Sep 13, 2026
Merged

docs: add API Platform 4.4 to 5.0 upgrade guide#2330
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:docs/upgrade-guide-5.0

Conversation

@soyuka

@soyuka soyuka commented Sep 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds the missing ## API Platform 4.4 to 5.0 section to core/upgrade-guide.md (was entirely absent — 0/10 breaking-change coverage per the docs audit).
  • Every claim verified against api-platform/core at upstream/main (the shipped PHP source, not just CHANGELOG prose) and against CHANGELOG.md's v5.0.0-beta.1 entry.

What's covered (Breaking Changes)

  • JSON:API use_iri_as_id now defaults to false — before/after payload, Symfony + Laravel opt-out, cross-link to jsonapi.md.
  • DeserializeProvider constructor: TranslatorInterface 4th arg dropped, DenormalizationViolationFactoryInterface moves 5th → 4th; api-platform/state no longer requires symfony/translation-contracts.
  • Request::getContentType() fallbacks dropped (core#8517) — internal, tied to the ^7.4 || ^8.0 floor.
  • The full core#8367 removed-API batch: config keys (query_parameter_validation, enable_link_security, resource_class_directories, graphql_playground, varnish_urls, xkey), ObjectMapperProcessor split into Input/Output processors, DefinitionNameFactory's $distinctFormats arg, ValidationException's string-message ctor, ApiTestCase::$alwaysBootKernel default, automatic short-name deduplication, and the now-explicit api_assign_object_to_populate context flag.
  • Legacy PropertyInfo Type system removed for symfony/type-info (core#8364): ApiProperty::$builtinTypes/getBuiltinTypes()/withBuiltinTypes()nativeType; GraphQL TypeConverterInterface::getType()convertPhpType(); ContextAwareTypeBuilderInterface::isCollection() removed.
  • PropertyAwareFilterInterface::getProperties() now a real interface method; JSON:API error status is now a string (core#8366).
  • JSON-LD /contexts/Error and /contexts/ConstraintViolationList no longer special-cased; SerializerContextBuilder no longer injects uri_variables (core#8402).
  • UniqueConstraintViolationException → 422 by default (core#8478).
  • Doctrine filters: ComparisonFilter gains [between], RangeFilter deprecated (removed in 6.0), DateFilter/ExistsFilter become standalone — kept short, cross-linked to doctrine-filters.md (owned by another in-flight PR).
  • CompatibleValueResolverInterface removed; PayloadArgumentResolver implements ValueResolverInterface directly.

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

Corrections vs. the source task list

  • "automatic short-name deduplication" is not a removed API per se — verified in MetadataCollectionFactoryTrait::deduplicateShortNames() (core commit e22e74464) that the deduplicate_resource_short_names opt-in flag and its deprecation path are removed, making deduplication unconditional. Phrased it that way rather than as an outright removal.
  • Config key paths verified precisely from Configuration.php: validator.query_parameter_validation, graphql.graphql_playground, http_cache.invalidation.varnish_urls, http_cache.invalidation.xkey (nested), vs. root-level enable_link_security and resource_class_directories.
  • assign_object_to_populate: the 5.0 change removes DeserializeProvider's own HTTP-method-based fallback (verified in commit e22e74464's diff of DeserializeProvider.php); the flag is instead set upstream by MainController/DeserializeListener (Symfony) and ApiPlatformController (Laravel), confirmed by commit 58f28b8e7.

Left out / not verified

  • Did not touch 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 to core/upgrade-guide.md).
  • Did not restate doctrine-filters.md filter migration content — another PR owns that page.

Test plan

  • npx prettier@3.9.5 --check core/upgrade-guide.md --prose-wrap always passes.
  • Whole-repo npx prettier@3.9.5 --check "**/*.md" --prose-wrap always shows only 2 pre-existing failures (core/doctrine-filters.md, core/filters.md), confirmed present on upstream/main before this change (unrelated, out of scope).

@soyuka
soyuka force-pushed the docs/upgrade-guide-5.0 branch from 0425ea6 to c31306e Compare September 13, 2026 08:01
@soyuka
soyuka merged commit 6f7b476 into api-platform:main Sep 13, 2026
3 checks passed
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