-
Notifications
You must be signed in to change notification settings - Fork 117
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
Max depth issues when used with "embedded" relations #246
Conversation
The biggest change is in @willdurand @adrienbrault If you think that this new mandatory parameter is a BC break, I'm ready to provide an alternative solution to it. |
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! What commit/fix in the serializer is required for this to work ?
schmittjoh/serializer@793406a is the commit that fixed it (the check is done inside The JSON case was ok from the serializer point of view. |
ping 😃 |
Thanks @goetas |
thanks to you guys for the hateoas library. |
top! |
Fixes #236 #136
Closes #237 #244
Hi, this is an alternative version of #237 and #244 that fixes some issues with
@MaxDepth
when used inside "embedded" relations.I'm currently the maintainer of jms/serializer, this requires the 1.6.1 (currently the latest) version, I've spent days to figure out the issue and to properly test it. 😥 But here it is. The XML version was even more complicated that uncovered also a bug in the serializer library.
Is really similar to what @adrienbrault proposed long time ago, but for me that solution never worked when was used in combination with
@Embedded
. The issue was that the max-depth configs were not copied to theRelationPropertyMetadata
.This version does not require additional classes ( the empty
EmbeddedPropertyMetadata
class ) as in the @adrienbrault's versionjms/serializer requires PHP 5.5, this forces this library to use at least php 5.5...