-
-
Notifications
You must be signed in to change notification settings - Fork 843
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
Use jms/serializer groups detection logic #1482
Conversation
@GuilhemN If you are OK with moving that logic outside of nelmio-apidoc, I can complete this |
Indeed, it probably makes more sense to include this in JMS 👍 |
Great! will let you know as soon as i am done! |
907ebe9
to
5f911b7
Compare
3b7d81b
to
af1fa58
Compare
af1fa58
to
f415ac2
Compare
@GuilhemN excluding the composer.json changes, this is ready for review (probably a first round). Preamble: I'm going to release jms/serializer 3.0, that reverts the nested group strategy as it was in 1.x (see schmittjoh/serializer#1071). 2.x will not be supported anymore. Because of the jms/serializer changes, I think also that naelmio/api-doc should just drop support for jms/serializer 2.x, and focus only on 1.x and 3.x. This decision allows to not have to maintain anymore v1 and v2 tests, so I have just deleted the v2 tests. Regarding the other changes, now jms/serializer exposes |
composer.json
Outdated
@@ -44,7 +44,8 @@ | |||
"api-platform/core": "^2.1.0", | |||
"friendsofsymfony/rest-bundle": "^2.0", | |||
"willdurand/hateoas-bundle": "^1.0|^2.0", | |||
"jms/serializer-bundle": "^2.0|^3.0" | |||
"jms/serializer-bundle": "^2.0|^3.0", | |||
"jms/serializer": "dev-master as 2.99.0" |
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.
when this jms/serializer 3.0 will be tagged, this will be just ^1.14|^3.0
composer.json
Outdated
@@ -29,7 +29,7 @@ | |||
"symfony/asset": "^3.4|^4.0", | |||
"symfony/console": "^3.4|^4.0", | |||
"symfony/config": "^3.4|^4.0", | |||
"symfony/validator": "^3.4|^4.0", | |||
"symfony/validator": "^3.4|~4.1.0", |
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.
this is a temporary fix for symfony/symfony#31152
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.
Looks good to me 👍
f415ac2
to
8dc283e
Compare
8dc283e
to
4fbf096
Compare
@GuilhemN this is ready! jms/serializer v3 released the test failure is related to symfony/symfony#31152 |
Great, thank you @goetas :) Congrats for releasing JMS v3 😃 |
This PR moves outside of NelmioApiDocBundle the logic for groups detection.
In this way jms/serializer can change the groups logic without affection NelmioApiDocBundle code.
Another advantage or this solution is that will be possible to introduce easily other exclusion strategies (as versioning) without changing too much code.
TODO: