Skip to content
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

Closed
wants to merge 10 commits into from

Conversation

javiereguiluz
Copy link
Member

This is an alternative to #6453.

@xabbuh
Copy link
Member

xabbuh commented Apr 21, 2016

@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?

@javiereguiluz
Copy link
Member Author

@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.

@wouterj
Copy link
Member

wouterj commented May 5, 2016

👎 on this place. #6453 placed it next to the other sections about Controller response shortcut methods, which seems a better position to me.

@javiereguiluz
Copy link
Member Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helper

@wouterj
Copy link
Member

wouterj commented May 21, 2016

I think we have to document the encoding implementation a bit. This should mostly linking to the Serializer docs and describe that if framework.serializer is not enabled in config.yml, it'll simply use json_encode().

@javiereguiluz
Copy link
Member Author

@wouterj I've added a note about how are contents encoded. Thanks!

@xabbuh
Copy link
Member

xabbuh commented May 21, 2016

👍

wouterj added a commit that referenced this pull request May 21, 2016
…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
wouterj added a commit that referenced this pull request May 21, 2016
@wouterj
Copy link
Member

wouterj commented May 21, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants