PHPackages                             twig/twig - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. twig/twig

ActiveLibrary[Templating &amp; Views](/categories/templating)

twig/twig
=========

Twig, the flexible, fast, and secure template language for PHP

v3.24.0(2mo ago)8.4k443.2M—9.6%1.3k[54 issues](https://github.com/twigphp/Twig/issues)[16 PRs](https://github.com/twigphp/Twig/pulls)20BSD-3-ClausePHPPHP &gt;=8.1.0CI passing

Since Oct 8Pushed 2d ago208 watchersCompare

[ Source](https://github.com/twigphp/Twig)[ Packagist](https://packagist.org/packages/twig/twig)[ Docs](https://twig.symfony.com)[ GitHub Sponsors](https://github.com/fabpot)[ Fund](https://tidelift.com/funding/github/packagist/twig/twig)[ RSS](/packages/twig-twig/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (248)Used By (20)Security (9)

Twig, the flexible, fast, and secure template language for PHP
==============================================================

[](#twig-the-flexible-fast-and-secure-template-language-for-php)

Twig is a template language for PHP.

Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.

Sponsors
--------

[](#sponsors)

[ ![Blackfire.io](https://camo.githubusercontent.com/e20b8b488230b09e9e7a49461bcc6d890fc674a3a9db2209b53c38c22e4b24ce/68747470733a2f2f7374617469632e626c61636b666972652e696f2f6173736574732f696e74656d706f72616c732f6c6f676f2f706e672f626c61636b666972652d696f5f7365636f6e646172795f686f72697a6f6e74616c5f7472616e73706172656e742e706e673f31)](https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo)More Information
----------------

[](#more-information)

Read the [documentation](https://twig.symfony.com/documentation) for more information.

###  Health Score

88

—

ExcellentBetter than 100% of packages

Maintenance94

Actively maintained with recent releases

Popularity89

Widely adopted with strong download metrics

Community70

Healthy contributor diversity

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 87.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

247

Last Release

58d ago

Major Versions

v2.15.6 → v3.8.02023-11-21

v2.16.0 → v3.9.02024-04-16

1.x-dev → 2.x-dev2024-09-09

v2.16.1 → v3.14.02024-09-09

v3.23.0 → 4.x-dev2026-03-17

PHP version history (13 changes)1.3.0PHP &gt;=5.2.4

v1.18.1PHP &gt;=5.2.7

v2.0.0PHP ^7.0

v1.34.0PHP &gt;=5.3.3

v1.37.0PHP &gt;=5.4.0

v1.42.3PHP &gt;=5.5.0

v3.0.0-BETA1PHP ^7.2.9

v3.0.1PHP ^7.2.5

v1.43.0PHP &gt;=7.1.3

v3.0.4PHP &gt;=7.2.5

v3.12.0PHP &gt;=8.0.2

v3.20.0PHP &gt;=8.1.0

4.x-devPHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (5759 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (82 commits)")[![derickr](https://avatars.githubusercontent.com/u/208074?v=4)](https://github.com/derickr "derickr (80 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (55 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (55 commits)")[![hason](https://avatars.githubusercontent.com/u/288535?v=4)](https://github.com/hason "hason (54 commits)")[![arnaud-lb](https://avatars.githubusercontent.com/u/365207?v=4)](https://github.com/arnaud-lb "arnaud-lb (52 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (43 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (33 commits)")[![SpacePossum](https://avatars.githubusercontent.com/u/10462973?v=4)](https://github.com/SpacePossum "SpacePossum (32 commits)")[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (32 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (31 commits)")[![smnandre](https://avatars.githubusercontent.com/u/1359581?v=4)](https://github.com/smnandre "smnandre (27 commits)")[![tucksaun](https://avatars.githubusercontent.com/u/870118?v=4)](https://github.com/tucksaun "tucksaun (21 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (20 commits)")[![VincentLanglet](https://avatars.githubusercontent.com/u/9052536?v=4)](https://github.com/VincentLanglet "VincentLanglet (20 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (19 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (17 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (17 commits)")[![char101](https://avatars.githubusercontent.com/u/71255?v=4)](https://github.com/char101 "char101 (17 commits)")

---

Tags

phptemplate-enginetemplate-languagetemplatingtwigtemplating

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/twig-twig/health.svg)

```
[![Health](https://phpackages.com/badges/twig-twig/health.svg)](https://phpackages.com/packages/twig-twig)
```

###  Alternatives

[symfony/form

Allows to easily create, process and reuse HTML forms

2.8k152.1M2.8k](/packages/symfony-form)[smarty/smarty

Smarty - the compiling PHP template engine

2.3k39.1M395](/packages/smarty-smarty)[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
