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_Error_Syntax] The function "debug" does not exist #1022

Closed
onet4 opened this issue Aug 28, 2013 · 4 comments
Closed

[Twig_Error_Syntax] The function "debug" does not exist #1022

onet4 opened this issue Aug 28, 2013 · 4 comments

Comments

@onet4
Copy link

onet4 commented Aug 28, 2013

When I insert {{ dump() }} in the namespace.html.twig file of the clean template, I get

[Twig_Error_Syntax] The function "debug" does not exist in "/namespace.html.twig" at line 4.

Reference: http://twig.sensiolabs.org/doc/functions/dump.html

I'd like to see the contents of all the available variables.

@mvriel
Copy link
Member

mvriel commented Sep 2, 2013

I have added a template / transformation parameter twig-debug that can be set to the value true in the develop branch. When set to true you can use the dump() command.

Unfortunately there appears to be an upstream bug with deserializing template XML files; I have filed issue schmittjoh/serializer#139 to resolve this. Once this is resolved will the above work

@onet4
Copy link
Author

onet4 commented Sep 6, 2013

Thanks for the response. I'm looking forward to it being implemented.

@mvriel
Copy link
Member

mvriel commented Sep 6, 2013

I have fixed this issue on the develop branch of phpDocumentor2; if you add the following section to your template then all twig transformations run in debug mode and is dump available:

  <parameters>
     <parameter key="twig-debug">true</parameter>
  </parameters>

@mvriel mvriel closed this as completed Sep 6, 2013
@onet4
Copy link
Author

onet4 commented Sep 7, 2013

Thanks!

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

No branches or pull requests

2 participants