-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Added the json() shortcut to the controller chapter #6502
Conversation
@javiereguiluz In #6453 you said that the explanation comes too early. But here it is even more to the top of the document. Is that intended? |
@xabbuh you are right. I got confused 😕 The problem is that I couldn't find a place where all the base controller shortcuts are explained. I'll let you decide what to do with this and the other PR. |
👎 on this place. #6453 placed it next to the other sections about Controller response shortcut methods, which seems a better position to me. |
OK, here it's a new proposal: I've moved the explanation to the same location as #6453 and simplified everything. |
@@ -778,11 +784,25 @@ There are also special classes to make certain kinds of responses easier: | |||
:class:`Symfony\\Component\\HttpFoundation\\StreamedResponse`. | |||
See :ref:`streaming-response`. | |||
|
|||
.. seealso:: | |||
JSON helper |
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.
Helper
I think we have to document the encoding implementation a bit. This should mostly linking to the Serializer docs and describe that if |
@wouterj I've added a note about how are contents encoded. Thanks! |
👍 |
…ridrich, javiereguiluz) This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #6502). Discussion ---------- Added the json() shortcut to the controller chapter This is an alternative to #6453. Commits ------- 8aa429d Syntax issue f1441b2 Explained how contents are serialized 6824706 Fixed typo 95d5f2e Fixed minor typo 0316363 Fixes 78aa9cb Simplified everything 7a8ad76 Moved the json() helper explanation 97a2f9c Added the json() shortcut to the controller chapter ba6a922 Update docs for JSON helper 91b2d00 Added docs for JSON helper
Thanks @javiereguiluz and @dfridrich for your work on documenting this feature! It's now merged into the 3.1 branch. Fyi, I fixed a minor syntax issue and added a versionadded directive in 73f71a0 |
This is an alternative to #6453.