a Sensio Labs Product

The flexible, fast, and secure
template language for PHP

Twig 1.11.0 released

I’m very happy to announce the immediate availability of Twig 1.11.

As with any new release, the documentation has been improved for existing features, and two new recipes have been published: Using a Database to store Templates and Using different Template Sources. I have also added a new section to explain how blocks work in Twig.

In 1.11, you can now import a template from a string thanks to the template_from_string function (this was probably one the of most often asked feature on the mailing-list).

Of course, we have fixed some bugs too:

  • macro compilation when a variable name is a PHP reserved keyword
  • bitwise operator precedences
  • default timezone usage for the date function
  • the date filter behavior which now always apply the default timezone, except if false is passed as the timezone

And last, but not the least, the performance of the exception management has been greatly improved, especially when using the Twig loader chain.

This website is powered by PHP and Twig.