zendframework / zend-expressive-twigrenderer

Twig integration for Expressive
BSD 3-Clause "New" or "Revised" License
25 stars 14 forks source link

Support Twig 2.1 #28

Closed michalbundyra closed 7 years ago

michalbundyra commented 7 years ago

This PR is based on #27 and resolves #25.

The public interface is not changed so it could be released with 1.3.0 version.

Maybe will be worth to note that is not possible to use anymore aliases for extensions, just class name, so instead of:

$environment->getExtension('core');

we have to do now:

$environment->getExtension(Twig_Extension_Core::class);

In this PR we allow Twig ^1.31 || ^2.1.

geerteltink commented 7 years ago

Maybe will be worth to note that is not possible to use anymore aliases for extensions, just class name ...

This would be a BC break.

michalbundyra commented 7 years ago

@xtreamwayz as we talked on IRC it shouldn't be considered as BC Break. The public interface of the zend-expressive-twigrenderer library is not changed. Only on instance of Twig_Environment you can't get extension by alias, and this is change in twig, maybe there are more changes there, this is one what I've noted. So as interface of our library is not changed this feature could be released with 1.3.0.

/cc @weierophinney

weierophinney commented 7 years ago

Thanks, @webimpress!