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.27.1(1mo ago)8.7k465.7M—4.7%1.3k[33 issues](https://github.com/twigphp/Twig/issues)[12 PRs](https://github.com/twigphp/Twig/pulls)20BSD-3-ClausePHPPHP &gt;=8.1.0CI passing

Since Oct 8Pushed 1w 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 3d ago

READMEChangelog (6)Dependencies (34)Versions (255)Used By (20)Security (25)

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

89

—

ExcellentBetter than 100% of packages

Maintenance96

Actively maintained with recent releases

Popularity90

Widely adopted with strong download metrics

Community70

Healthy contributor diversity

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 87.9% 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

Recently: every ~9 days

Total

252

Last Release

9d ago

Major Versions

v2.16.0 → v3.9.02024-04-16

v1.44.8 → v2.16.12024-09-09

2.x-dev → v3.14.02024-09-09

v3.25.0 → v4.0.0-alpha12026-05-17

v3.27.1 → 4.x-dev2026-06-11

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

v4.0.0-alpha1PHP &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 (5908 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (85 commits)")[![derickr](https://avatars.githubusercontent.com/u/208074?v=4)](https://github.com/derickr "derickr (80 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (55 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (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 (44 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (33 commits)")[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (32 commits)")[![SpacePossum](https://avatars.githubusercontent.com/u/10462973?v=4)](https://github.com/SpacePossum "SpacePossum (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)")[![VincentLanglet](https://avatars.githubusercontent.com/u/9052536?v=4)](https://github.com/VincentLanglet "VincentLanglet (20 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (20 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (19 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (17 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (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.8k162.1M3.4k](/packages/symfony-form)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[symfony/validator

Provides tools to validate values

2.7k306.4M4.1k](/packages/symfony-validator)[symfony/doctrine-bridge

Provides integration for Doctrine with various Symfony components

3.2k200.7M875](/packages/symfony-doctrine-bridge)[symfony/config

Helps you find, load, combine, autofill and validate configuration values of any kind

4.3k479.6M8.4k](/packages/symfony-config)

PHPackages © 2026

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