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

Declare plugins for Twig in template.xml #988

marcimat opened this Issue Aug 5, 2013 · 2 comments


None yet
2 participants

marcimat commented Aug 5, 2013

With 2.0.0, I'll try to add plugins to the Twig Environnement. In the template.xml I declare those lines :


But, Twig doesn't recieve theses parameters.
I have no parameters in the method addExtensionsFromTemplateConfiguration() in

Thanks for all great work in this new version !


This comment has been minimized.


mvriel commented Sep 2, 2013

I have been debugging this and it appears that the code to handle parameters could be improved and there seems to be an issue in JMS Serializer that prevents the parameters array from populating. I have created issue schmittjoh/serializer#139 to investigate this


This comment has been minimized.


mvriel commented Sep 6, 2013

I have fixed this issue in the develop branch of phpDocumentor2. Unfortunately I had to change the format of the parameters due to a limitation in JMS Serializer.

You can add the following to your template:

     <parameter key="twig-extension">\Twig_Extension_Debug</parameter>

You can also set the parameter twig-debug to the value true; this will enable debug mode for Twig and include the debug extension

@mvriel mvriel closed this Sep 6, 2013

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