This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle
Fabien Potencier 7c98954920 feature #31390 [Serializer] UnwrappingDenormalizer (nonanerz)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Serializer] UnwrappingDenormalizer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

UnwrappingDenormalizer, registered with very high priority. Unwrapping the data if UNWRAP_PATH is provided.

Very often some APIs give nested responses in which we need only the child object. With UnwrappingDenormalizer we can get the needed object without creating unnecessary Model class that we don't really need.

Regarding to https://github.com/symfony/symfony/pull/28887 and https://github.com/symfony/symfony/pull/30894

Usage:

`$serialiser->deserialize('{"baz": {"foo": "bar", "inner": {"title": "value", "numbers": [5,3]}}}', Object::class, ['UnwrappingDenormalizer::UNWRAP_PATH' => '[baz][inner]'])`

Commits
-------

00d103d5f7 UnwrappingDenormalizer
2020-04-12 09:17:11 +02:00
..
DebugBundle Merge branch '5.0' 2020-03-30 13:43:41 +02:00
FrameworkBundle feature #31390 [Serializer] UnwrappingDenormalizer (nonanerz) 2020-04-12 09:17:11 +02:00
SecurityBundle Merge branch '5.0' 2020-04-06 12:46:53 +02:00
TwigBundle [DI] add tags container.preload/.no_preload to declare extra classes to preload/services to not preload 2020-04-05 09:04:12 +02:00
WebProfilerBundle Merge branch '5.0' 2020-04-06 12:46:53 +02:00
FullStack.php [FrameworkBundle] changed some default configs from canBeEnabled to canBeDisabled 2017-01-07 14:17:04 -08:00