Twig version 1.x On Record Run Of Ten Years

https://twig.symfony.com/

Ten years after releasing Twig v1.0.0- the last version 1.44.6  is here. It will be the last version for the 1.x series. The 3.x version of Twig is available now. Twig 3.x needs at the least PHP 7.2.5 to run.

Twig in Drupal

Drupal 9, the current version uses Twig 2.
Warning: Using Twig debug can break parts of the Drupal site. https://www.drupal.org/node/2914733

What is Twig?

Twig- the flexible, fast and secure template language for PHP. Twig uses a syntax similar to Django and Jinja template languages which inspired the Twig runtime environment.

Twig is both designer and developer-friendly by sticking to PHP's principles and adding functionality useful for templating environments.

Features of Twig

The key features of Twig are:

  • Fast: Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum.
  • Secure: Twig has a sandbox mode to evaluate untrusted template code. This allows Twig to be used as a template language for applications where users may modify the template design.
  • Flexible: Twig is powered by a flexible lexer and parser. This allows the developer to define their own custom tags and filters, and to create their own DSL.

Twig is used by many Open-Source projects like Symfony, Drupal8, eZPublish, phpBB, Matomo, OroCRM; and many frameworks have support for it as well like Slim, Yii, Laravel, and Codeigniter — just to name a few.

Compiled from:

Tags
Advertisement Here