September 13, 2015 Fabien Potencier

Twig 1.22 is full of great features.

First, the template cache has been extracted to its own class to ease integration with specific needs (like Drupal). Note that you should probably not use it to store the compiled template classes elsewhere than the filesystem though. This new feature comes with some deprecations in Twig_Environment ( clearCacheFiles() , getCacheFilename() , writeCacheFile() , and getTemplateClassPrefix() ).

Other changes includes the following: