-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Supports hassers and setters for groups annotations #14187
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ping @symfony/deciders |
@@ -22,18 +22,21 @@ class GroupDummy extends GroupDummyParent implements GroupDummyInterface | |||
* @Groups({"a"}) | |||
*/ | |||
private $foo; | |||
/** | |||
* @Groups({"b", "c"}) | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this present before? Can it safely be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's safe, I've just moved them on other supported methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you test "hasser" ?
looks good to me 👍 |
👍 |
2 similar comments
👍 |
👍 |
Ok to merge it in 2.7? |
@aitboudad I know that but it can be considered as part of the "serializer groups" and "object normalizer" feature and those features have been released with the beta ;) I think it's better to have polished features in 2.7 stable and this is some polish. |
Btw the PR was open 8 days before the release of the beta. |
IMO it's totally correct to have this in 2.7 as this is addition to new feature introduced in that version, so it's like "bugfix" ;) |
well I think this can be considered as a bugfix. |
@aitboudad it's a matter of taste but I think yes. In fact this PR is derived from a use case in a project I work on:
|
…nnotations (dunglas) This PR was merged into the 2.7 branch. Discussion ---------- [Serializer] Supports hassers and setters for groups annotations | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a For more coherence with the new `ObjectNormalizer` (#13257), this PR allows to add `@Groups` annotations on hasser and setter methods too. Commits ------- 9c87ecc [Serializer] Supports hassers and setters for groups annotations
For more coherence with the new
ObjectNormalizer
(#13257), this PR allows to add@Groups
annotations on hasser and setter methods too.