-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Serializer] Docs for the @MaxDepth annotation #7039
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
public $foo; | ||
|
||
// ... | ||
} |
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.
Indent php code block.
), | ||
), | ||
); | ||
*/ |
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.
Add missing .. code-block:: php-annotations
.
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.
Actually, just .. code-block:: php
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.
👍 a useful feature explained in a clear and concise way. Thanks @dunglas.
@javiereguiluz Hello. I was playing with the serializer and I did not find the doc on symfony.com. You added your 👍 15 days ago. I think we can merge this one to be able to deploy this new documentation? (It's available since symfony 3.1 ...) |
@lyrixx you are so right!! But before merging PRs in Symfony Docs, we need two 👍 from maintainers. So we need that @weaverryan or @xabbuh or @wouterj vote on this too. Thanks! |
I have a question regarding the max depth. I am not sure if this is desired behavior or a bug. If its the former, we should document this. If its the latter, we should fix the bug (I think it's a bug, but I wanted to ask you before opening an issue). Consider some code that extends your example code with more levels (4, 5, etc.). By keeping a max depth of 2, the result is the following:
As you can see, it considers all child nodes and does not stop after the configured max depths. Only the data of the objects in deeper levels is excluded (attribute foo). |
Thank you Kévin. |
…, javiereguiluz) This PR was merged into the 3.1 branch. Discussion ---------- [Serializer] Docs for the @MaxDepth annotation Docs for symfony/symfony#17113. Commits ------- d7395d3 Make lines shorter to comply with our soft limit of 80 chars per line 93dcc3f Fix comments 97f48e5 [Serializer] Docs for the @MaxDepth annotation
@digilist I think best is if you could open an issue on the code repository containing the necessary code to reproduce your issue. |
Docs for symfony/symfony#17113.