Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Reworded the note about dump() not being available in prod #7954

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reworded the note about dump() not being available in prod
  • Loading branch information
javiereguiluz committed May 28, 2017
commit e218df891c1af6db076db7581b6982bf4e1b8284
8 changes: 5 additions & 3 deletions 8 templating/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function:
</a>
{% endfor %}

The variables will only be dumped if Twig's ``debug`` setting (in ``config.yml``)
is ``true``. By default this means that the variables will be dumped in the
``dev`` environment but not the ``prod`` environment.
By design, the ``dump()`` function is only available if the ``debug`` setting
Copy link
Member

Choose a reason for hiding this comment

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

I think we should make more clear what the debug setting is (one may confuse twig.debug and kernel.debug which are probably the same, but which still can differ).

(in ``config.yml``) is ``true``, to avoid leaking sensitive information in
production. In fact, trying to use the ``dump()`` function when ``debug`` is
``false`` (for example in the ``prod`` environment) will result in an
application error.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.