feat!: remove deprecated APIs scheduled for 5.0#8367
Merged
Conversation
Drop deprecated code paths kept as BC layers until 5.0 (TODO bucket A). LegacyType PropertyInfo removals are handled separately; the getDescription() and OpenApi swagger field removals stay deferred to 6.0. - Remove SerializerAwareProviderInterface / SerializerAwareProviderTrait and the DataProviderPass compiler pass (deprecated 4.2). - Remove ObjectMapperProcessor (deprecated 4.3); use ObjectMapperInputProcessor and ObjectMapperOutputProcessor. - DefinitionNameFactory: drop the $distinctFormats constructor argument; drop it from JsonSchema\SchemaFactory and its wiring. - ValidationException: the first constructor argument is now a ConstraintViolationListInterface (string messages no longer accepted). - DeserializeProvider: ASSIGN_OBJECT_TO_POPULATE must be set explicitly (it is set upstream by MainController / DeserializeListener); drop the implicit per-method fallback. - ApiTestCase::$alwaysBootKernel now defaults to false. - Configuration: remove deprecated nodes query_parameter_validation, enable_link_security, resource_class_directories, graphql_playground, varnish_urls and xkey. - Resource short name deduplication is now automatic; drop the opt-in extra_properties.deduplicate_resource_short_names flag.
enable_link_security was removed from Configuration in the 5.0 cleanup, but config_common.yml still set it, so cache:warmup failed with "Unrecognized option" and broke every job booting the test container.
DeserializeProvider no longer triggers the object_to_populate deprecation in 5.0; the assertions for it are dead and the test now fails.
DeserializeProvider only populates the loaded object when api_assign_object_to_populate is set in the denormalization context. The Symfony path sets it in MainController/DeserializeListener, but the Laravel controller did not, so PATCH re-inserted a fresh model and hit NOT NULL constraint violations. Mirror the Symfony logic: set it for POST, PATCH and non-standard PUT.
The SerializableProvider class was removed with the 5.0 deprecation cleanup; config_common.yml still registered it as a service, failing lint:container with "class does not exist".
The code paths fetching private services were removed in the 5.0 cleanup, leaving the ignore pattern unmatched and failing PHPStan with reportUnmatchedIgnoredErrors.
With automatic short name deduplication, the operation serving a request carries the deduplicated short name (e.g. AttributeResource2), so @context follows it while @type used the first resource's short name, producing a mismatch. Use the operation short name for @type when the operation serves the normalized class; keep the resource-level lookup for embedded resources whose operation belongs to another class.
56407b7 to
f806ae6
Compare
The getLastPage/getTotalItems float return errors no longer fire, so the inline ignores were reported as unmatched.
…name
Company shares its short name across three ODM #[ApiResource] blocks vs
two on ORM, so automatic dedup yielded Company3 on ODM but Company2 on ORM
for /employees/{employeeId}/company. Naming the ODM-only /rooms block keeps
that endpoint at Company2 on both configs.
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.
Removes deprecated code paths kept as BC layers until 5.0 (TODO bucket A). LegacyType PropertyInfo removals ship separately (#8364);
FilterInterface::getDescription()and the OpenApiswaggerfield stay deferred to 6.0.Removals
SerializerAwareProviderInterface/SerializerAwareProviderTrait+ theDataProviderPasscompiler pass (deprecated 4.2).ObjectMapperProcessor(deprecated 4.3) — useObjectMapperInputProcessor/ObjectMapperOutputProcessor.DefinitionNameFactory: drop the$distinctFormatsconstructor argument (and fromJsonSchema\SchemaFactory+ wiring).ValidationException: first constructor argument is nowConstraintViolationListInterface(string messages no longer accepted).DeserializeProvider:ASSIGN_OBJECT_TO_POPULATEmust be set explicitly (set upstream byMainController/DeserializeListener); drop the implicit per-method fallback.ApiTestCase::$alwaysBootKernelnow defaults tofalse(see bug(tests): (Symfony)ApiTestCase::createClient()boot kernel on each call #6971).query_parameter_validation,enable_link_security,resource_class_directories,graphql_playground,varnish_urls,xkey.extra_properties.deduplicate_resource_short_namesflag.Notes