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

Twig dump() function is NOT available on prod #7937

Closed
weaverryan opened this issue May 22, 2017 · 0 comments
Closed

Twig dump() function is NOT available on prod #7937

weaverryan opened this issue May 22, 2017 · 0 comments
Assignees
Labels
bug hasPR A Pull Request has already been submitted for this issue.

Comments

@weaverryan
Copy link
Member

At the bottom of: http://symfony.com/doc/current/templating/debug.html

We say:

By default this means that the variables will be dumped in the dev environment but not the prod environment.

This seems to suggest that dump() will just do nothing in prod. But actually, as far as I can see, this function is not available at all, causing templates to fail in prod. That's because the DumpExtension from DebugBundle that provides dump() is not used, because DebugBundle is not enabled in the prod environment.

We should clarify that leaving dump() in your code is a big problem :).

@weaverryan weaverryan added the bug label May 22, 2017
@javiereguiluz javiereguiluz self-assigned this May 28, 2017
@javiereguiluz javiereguiluz added the hasPR A Pull Request has already been submitted for this issue. label May 28, 2017
xabbuh added a commit that referenced this issue Jul 7, 2017
…d (javiereguiluz)

This PR was squashed before being merged into the 2.7 branch (closes #7954).

Discussion
----------

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

This fixes #7937.

Commits
-------

830ac84 Reworded the note about dump() not being available in prod
@xabbuh xabbuh closed this as completed Jul 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

4 participants