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] Fix extra attributes when no group specified#24816

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:3.3fromogizanagi:fix/serializer_extra_attributes_no_groups
Nov 5, 2017
Merged

[Serializer] Fix extra attributes when no group specified#24816

fabpot merged 1 commit intosymfony:3.3fromogizanagi:fix/serializer_extra_attributes_no_groups
Nov 5, 2017

Conversation

@ogizanagi
Copy link
Contributor

@ogizanagiogizanagi commentedNov 4, 2017
edited
Loading

QA
Branch?3.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#24783
LicenseMIT
Doc PRN/A

Two commits, for two possible solutions, but I think the last one is probably the most efficient one, as the first one will also impact normalization and systematically try to intersect allowedAttributes and extractedAttributes.


$allowedAttributes =$this->getAllowedAttributes($class,$context,true);

if (false ===$allowedAttributes &&$this->classMetadataFactory) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably useless to do this if$context[self::ALLOW_EXTRA_ATTRIBUTES] is not set.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Right. Thanks :)

@fabpot
Copy link
Member

Thank you@ogizanagi.

@fabpotfabpot merged commitd1b343c intosymfony:3.3Nov 5, 2017
fabpot added a commit that referenced this pull requestNov 5, 2017
…(ogizanagi)This PR was merged into the 3.3 branch.Discussion----------[Serializer] Fix extra attributes when no group specified| Q             | A| ------------- | ---| Branch?       | 3.3 <!-- see comment below -->| Bug fix?      | yes| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->| Tests pass?   | yes| Fixed tickets |#24783 <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | N/A~~Two commits, for two possible solutions, but I think the last one is probably the most efficient one, as the first one will also impact normalization and systematically try to intersect allowedAttributes and extractedAttributes.~~Commits-------d1b343c [Serializer] Fix extra attributes when no group specified
@ogizanagiogizanagi deleted the fix/serializer_extra_attributes_no_groups branchNovember 5, 2017 15:53
This was referencedNov 5, 2017
nicolas-grekas added a commit that referenced this pull requestMar 16, 2018
This PR was merged into the 3.4 branch.Discussion----------[Serializer] Remove const override| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | N/AThis public const was moved to parent class in#24816Commits-------25312c4 [Serializer] Remove const override
ogizanagi added a commit that referenced this pull requestJun 21, 2018
…mented (deviantintegral)This PR was squashed before being merged into the 3.4 branch (closes#26534).Discussion----------allow_extra_attributes does not throw an exception as documented| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | none| License       | MIT| Doc PR        | noneThe example at [Deserializing an object](https://symfony.com/doc/current/components/serializer.html#deserializing-an-object) does not actually work. It looks like this is a bug and not a docs issue.#24783 reported the same bug, but it looks like the fix at#24816 isn't complete.Here's a failing test that copies the existing example.Commits-------a67b650 allow_extra_attributes does not throw an exception as documented
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+2 more reviewers

@enumagenumagenumag approved these changes

@SimperfitSimperfitSimperfit approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

5 participants

@ogizanagi@fabpot@enumag@Simperfit@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp