Skip to content

fix(state): map previous_data to the stateOptions class - #8867

Merged
soyuka merged 3 commits into
api-platform:5.0from
soyuka:fix/8866-put-mapped-previous-data
Nov 24, 2026
Merged

soyuka merged 3 commits into
api-platform:5.0from
soyuka:fix/8866-put-mapped-previous-data

Conversation

@soyuka

@soyuka soyuka commented Nov 24, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 5.0
Tickets Closes #8866
License MIT
Doc PR ~

ObjectMapperProvider stores the API resource in previous_data (security's previous_object must stay the resource), while ObjectMapperInputProcessor hands the entity to the Doctrine PersistProcessor. The standard PUT branch then read entity reflection properties on the resource and threw. The input processor now maps previous_data to the stateOptions class in the context it passes down.

The Doctrine PersistProcessor standard PUT reads previous_data as the
entity, but ObjectMapperProvider stores the API resource there.

Fixes api-platform#8866
@soyuka
soyuka force-pushed the fix/8866-put-mapped-previous-data branch from 0225bde to 19a9f17 Compare November 24, 2026 10:45
@soyuka
soyuka merged commit dd8b336 into api-platform:5.0 Nov 24, 2026
113 of 117 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