Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
62248c9 tob5953cbComparederrabus commentedOct 12, 2020
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. |
fabpot commentedOct 12, 2020
@derrabus Can you have a look at the failing tests? |
b5953cb tocfb9986Comparederrabus commentedOct 12, 2020
I used |
fabpot commentedOct 12, 2020
Thank you@derrabus. |
…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/AFollows#37474,#38525Currently, 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.
Support for all theses attributes was added in Symfony 5.2, together with the already present Groups attributeseesymfony/symfony#38525there is only one missing Serializer annotation, but it was added in Symfony 5.4, so I left that one outsymfony/symfony#38525
Let's use attributes for the serializer mapping configuration!