-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Description
API Platform version(s) affected: 3.0.4
Description
BC using Serialization Per Item appears to be broken after upgrading to version 3.0.4
How to reproduce
Implement a normalizer following the documentation. The custom Normalizer will dynamically add serialization groups to the serialization context. After upgrading to v3.0.4 the dynamic groups are no longer respected.
The getFactoryOptions
function in AbstractItemNormalizer (link) has added caching logic. If the context is cached, the options for serialization_context
will not include the dynamically added groups.
Possible Solution
Move the logic that calculates the serialization_context
ahead of the cache check and ensure they are all merged together.
soyuka and lougaou
Metadata
Metadata
Assignees
Type
Projects
Status
Done