Skip to content

Update Twig extension documentation to use 1.12 changes #2421

Closed
weaverryan opened this Issue Mar 30, 2013 · 4 comments

3 participants

@weaverryan
Symfony member

This will apply to 2.1+. As of Twig 1.12, creating a Twig extension is slightly different. For example, Twig_Function_Function is replaced by Twig_SimpleFunction.

Both the old and new version of the Twig docs are maintained, which is nice for comparison:

Old: http://twig.sensiolabs.org/doc/advanced_legacy.html#creating-an-extension
New: http://twig.sensiolabs.org/doc/advanced.html#creating-an-extension

@ricardclau

http://symfony.com/doc/master/cookbook/templating/twig_extension.html should be updated with the new way to go, right?

@WouterJ
Symfony member
WouterJ commented Apr 2, 2013

Yes, Ryan is talking about that document.

@ricardclau

Ok, I can take this one if you are ok with it.

@WouterJ
Symfony member
WouterJ commented Apr 2, 2013

of course! Do what you can! :)

@weaverryan weaverryan closed this Apr 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.