-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] Enabled mapping configuration via attributes #38525
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
Merged
fabpot
merged 1 commit into
symfony:5.x
from
derrabus:improvement/serializer-attributes
Oct 12, 2020
Merged
[Serializer] Enabled mapping configuration via attributes #38525
fabpot
merged 1 commit into
symfony:5.x
from
derrabus:improvement/serializer-attributes
Oct 12, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62248c9
to
b5953cb
Compare
I was wondering is we should make the #[Groups(['list', 'detail'])] … we could then write… #[Groups('list', 'detail')] This would look a bit nicer, but adding additional properties in the future would get messy. |
nicolas-grekas
approved these changes
Oct 12, 2020
@derrabus Can you have a look at the failing tests? |
b5953cb
to
cfb9986
Compare
I used |
Thank you @derrabus. |
Merged
derrabus
added a commit
that referenced
this pull request
Nov 7, 2020
…ration of routing/serializer without doctrine/annotations (derrabus) This PR was merged into the 5.2-dev branch. Discussion ---------- [FrameworkBundle] Allow to use attribute-based configuration of routing/serializer without doctrine/annotations | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A Follows #37474, #38525 Currently, we need `doctrine/annotations` to be installed in order to configure routing and serializer via PHP attributes. Given that for both components we can already replace Doctrine Annotations completely, I'd like to get rid of that limitation. Commits ------- e5492e2 [FrameworkBundle] Configure PHP Attributes without doctrine/annotations.
guillaumesmo
added a commit
to guillaumesmo/rector-symfony
that referenced
this pull request
Apr 11, 2022
Support for all theses attributes was added in Symfony 5.2, together with the already present Groups attribute see symfony/symfony#38525 there is only one missing Serializer annotation, but it was added in Symfony 5.4, so I left that one out symfony/symfony#38525
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Let's use attributes for the serializer mapping configuration!