Repository navigation
Release 2.9
Nested object support in multipart/form-data
MultipartEntityHydrator now supports nested object properties in multipart DTO requests. When a form field contains a JSON string and the target property is a typed object (not a scalar or enum), the hydrator automatically deserializes it using the configured EntitySerializer.
Before: Sending agentOwner={"registrationNumber":"000001"} as a multipart field resulted in a TypeError — the raw string was assigned directly to a typed object property.
After: The JSON string is automatically deserialized into the target DTO class.
class UploadRequest
{
public UploadedFile $file;
public ?AgentOwnerRequest $agentOwner = null; // ← now works from JSON string
}EntitySerializer is injected as an optional dependency — no breaking changes to existing code.