core icon indicating copy to clipboard operation
core copied to clipboard

fix(serializer): Pass the child context when denormalizing nested non-resource objects

Open philipsorst opened this issue 4 years ago • 1 comments

Q A
Branch? 2.6
Bug fix? yes
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

Currently, the createChildContext() method isn't used when denormalizing embedded objects that are not resources. Hence, for example, the AbstractNormalizer::ATTRIBUTES won't work for these objects.

This PR fixes that by invoking createChildContext() also for nested non-resource objects.

This is closely related to #4258 and #4521 which fixed the same issue when normalizing.

philipsorst avatar Jan 04 '22 17:01 philipsorst

as https://github.com/api-platform/core/pull/4521 broke quite a few implementations I'd like to move this over to the main branch with a rebase please.

soyuka avatar Mar 11 '22 10:03 soyuka

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 04 '22 21:11 stale[bot]