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] enable property info in framework bundle#19434

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

Closed
DavidBadura wants to merge1 commit intosymfony:masterfromDavidBadura:object-normalizer-with-property-info
Closed

[Serializer] enable property info in framework bundle#19434

DavidBadura wants to merge1 commit intosymfony:masterfromDavidBadura:object-normalizer-with-property-info

Conversation

@DavidBadura
Copy link
Contributor

@DavidBaduraDavidBadura commentedJul 26, 2016
edited
Loading

QA
Branch?3.1
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

I've been wondering why the datetime normalizer won't work in combination with object normalizer in symfony 3.1 by default. I also found nothing in the documentation. Onlyhttp://symfony.com/blog/new-in-symfony-3-1-datetime-normalizer but here is not described how to use it with the object normalizer and how to configure the config.yml.

After debugging i found out that the object normalizer don't use the new property info component. With my change, you can enabled it with following config:

serializer:enabled:trueproperty_info:~

Should i add analog toenable_annotation anenable_property_info option?

serializer:enabled:trueenable_property_info:trueproperty_info:~

tolry, dunglas, and dragonito reacted with thumbs up emoji
$this->registerPropertyInfoConfiguration($config['property_info'],$container,$loader);
}

if ($this->isConfigEnabled($container,$config['serializer'])) {
Copy link
Member

Choose a reason for hiding this comment

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

Why moving this block?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I check below if the serviceproperty_info exists (have you a better idea?). this assumes that property info is built before serializer.

@dunglas
Copy link
Member

Good catch! The new config flag isn't necessary because the ObjectNormalizer class already contains a test to determine if it can use the PropertyInfo component or not.

This PR must be merged in 3.1 as bug fix.

You're right, there are a lot of missing docs for the Symfony Serializer (this feature, the MaxDepth annotation, new normalizers like the data: URI one, new encoders...). I've started working on updating the doc but don't except PRs before the end of August (any help welcome, most PRs already include a documentation draft in their descriptions).

@DavidBadura
Copy link
ContributorAuthor

done :) should i create a new PR for symfony 3.1?

@dunglas
Copy link
Member

Thanks. No we are able to merge directly this PR in the right branch.

Status: reviewed

👍

@nicolas-grekas
Copy link
Member

Thank you@DavidBadura.

nicolas-grekas added a commit that referenced this pull requestJul 27, 2016
…id Badura)This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes#19434).Discussion----------[Serializer] enable property info in framework bundle| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -I've been wondering why the datetime normalizer won't work in combination with object normalizer in symfony 3.1 by default. I also found nothing in the documentation. Onlyhttp://symfony.com/blog/new-in-symfony-3-1-datetime-normalizer but here is not described how to use it with the object normalizer and how to configure the config.yml.After debugging i found out that the object normalizer don't use the new property info component. With my change, you can enabled it with following config:```yml    serializer:         enabled: true    property_info: ~```Should i add analog to `enable_annotation` an `enable_property_info` option?```yml    serializer:         enabled: true         enable_property_info: true    property_info: ~```Commits-------c02933d enable property info
@fabpotfabpot mentioned this pull requestJul 30, 2016
@DavidBaduraDavidBadura deleted the object-normalizer-with-property-info branchAugust 2, 2016 13:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@DavidBadura@dunglas@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp