zendframework / zend-expressive-twigrenderer

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

update twig version and use namespaced twig classes #51

Closed azjezz closed 5 years ago

azjezz commented 5 years ago

Adds PSR-4 Twig environment class alias.

allow users to access the twig environment using the PSR-4 twig environment class alias.

example :


use Twig\Environment;

$twig = $container->get(Environment::class);
geerteltink commented 5 years ago

@weierophinney I've thought about this today and I think it's only needed for Twig\Environment. No other class is referenced for API use. The only extra requirement that is needed is to increase the minimum Twig version to ^1.34.4 || ^2.1. For the rest I don't see any issues.

In the next minor release we could even swap to PSR-4 classes usage internally without affecting current installations if they use ^1.34.

azjezz commented 5 years ago

@weierophinney i have update the minimum required twig version to ^1.34 | ^2.4 as 1.34 and 2.4 are the first twig versions to contain the namespaced class names

azjezz commented 5 years ago

@weierophinney all set.

weierophinney commented 5 years ago

I've done the following:

All changes are now in the develop branch as of bad0be6