lexik / LexikPayboxBundle

LexikPayboxBundle eases the implementation of the Paybox payment system
MIT License
40 stars 47 forks source link

Fix support for Twig 2.* #83

Closed mathieu-gilloots closed 7 years ago

mathieu-gilloots commented 7 years ago

In Twig 2.* I've an error : Impossible to invoke a method ("input") on a string variable ("LexikPayboxBundle:Macro:paybox.html.twig").

Apparantly in v2, twig calls to _self directly give a string ""LexikPayboxBundle:Macro:paybox.html.twig" instead a twig template object.

@lexikteam

acidjames commented 7 years ago

Hi @mathieu-gilloots

do you know if it breaks BC with twig1 ?

thanks,

mathieu-gilloots commented 7 years ago

@acidjames Normally works with twig 1

acidjames commented 7 years ago

From the twig 1x documentation, importing _self is the correct way to do https://twig.sensiolabs.org/doc/1.x/tags/macro.html

So this PR has been merged and thanks for contributing,

Cheers, James

mathieu-gilloots commented 7 years ago

You're welcome :)