Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Serializer] UnwrappingDenormalizer#31390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromnonanerz:unwrap_denormalizer
Apr 12, 2020

Conversation

nonanerz
Copy link
Contributor

@nonanerznonanerz commentedMay 6, 2019
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/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#28887 and#30894

Usage:

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

ro0NL reacted with thumbs up emoji
@nonanerznonanerzforce-pushed theunwrap_denormalizer branch 2 times, most recently from4c2eb4b to5b757a9CompareMay 6, 2019 08:25
@nicolas-grekasnicolas-grekas added this to thenext milestoneMay 9, 2019
@nonanerznonanerzforce-pushed theunwrap_denormalizer branch 2 times, most recently fromfe55720 to1e97075CompareAugust 30, 2019 16:37
Copy link
Member

@stofstof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please also add unit tests for the denormalizer itself.

nonanerz reacted with thumbs up emoji
inject an existing instance of PropertyAccess, implement hasCacheableSupportsMethodCoding Standard fixresolve conversationstest denormalizer
@nonanerz
Copy link
ContributorAuthor

Thank you for the feedback@dunglas and@stof. Now everything should be fine.

@nonanerz
Copy link
ContributorAuthor

Please also add unit tests for the denormalizer itself.

Hi. Can you please take a look? Waiting for your approval

@fabpot
Copy link
Member

Thank you@nonanerz.

@fabpotfabpot merged commit7c98954 intosymfony:masterApr 12, 2020
@nicolas-grekasnicolas-grekas modified the milestones:next,5.1May 4, 2020
@fabpotfabpot mentioned this pull requestMay 5, 2020
fabpot added a commit that referenced this pull requestJun 3, 2020
This PR was merged into the 5.1 branch.Discussion----------[FrameworkBundle] Extension Serializer issue| Q             | A| ------------- | ---| Branch?       | 5.1| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | ???| License       | MIT| Doc PR        |Hi,When creating a new Symfony project and requiring `symfony/serializer` we have an issue with required service.Here is a simple reproducer:![image](https://user-images.githubusercontent.com/944409/83497176-6266d480-a4ba-11ea-98cb-7e354be0a273.png)This bug was introduced by#31390Commits-------ab5628f FrameworkBundle Serializer issue
hultberg pushed a commit to hultberg/symfony that referenced this pull requestSep 17, 2021
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/aUnwrappingDenormalizer, 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 tosymfony#28887 andsymfony#30894Usage:`$serialiser->deserialize('{"baz": {"foo": "bar", "inner": {"title": "value", "numbers": [5,3]}}}', Object::class, ['UnwrappingDenormalizer::UNWRAP_PATH' => '[baz][inner]'])`Commits-------00d103d UnwrappingDenormalizer
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@dunglasdunglasdunglas approved these changes

@maxheliasmaxheliasmaxhelias approved these changes

@stofstofAwaiting requested review from stof

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

7 participants
@nonanerz@fabpot@dunglas@stof@maxhelias@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp