# symfony/twig-bundle

Provides a tight integration of Twig into the Symfony full-stack framework

Repository: https://github.com/symfony/twig-bundle
Canonical: https://ross.abutalabs.com/products/twig-bundle
Homepage: https://symfony.com/twig-bundle
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, component, symfony-component
Last push: 2026-08-14T13:38:05+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 95, longevity 100
- inputs: {"age_days": 5426, "days_push": 19, "days_rel": 35, "gap_med": 0, "n_releases_24m": 36}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2497, forks 23 (observed 2026-08-28T04:06:56.721211+00:00)

## What it is
A Symfony bundle that provides tight integration of the Twig template engine into the Symfony full-stack framework. It handles Twig configuration, template rendering from controllers and services, and template-related services via Symfony's dependency injection.

## Use cases
- render HTML templates in a Symfony app with Twig
- configure Twig template engine in Symfony
- render email bodies from Twig templates
- lint and debug Twig templates in Symfony
- set up template inheritance and layouts in Symfony
- create custom Twig extensions in a Symfony project

## When to choose
- you are building a Symfony application and want Twig as your template engine
- you need Twig configured and wired into Symfony's DI container automatically
- you render HTML pages or emails from Symfony controllers or services

## When to avoid
- you use a framework other than Symfony (use symfony/twig-bridge or plain Twig instead)
- your project builds HTML without a template engine (e.g., API-only JSON responses)
- you prefer a different templating language like Blade or Handlebars

## Facets
- artifact type: plugin
- maturity: stable
- function: templating, web-framework
- domain: web-development, backend, frontend
- platform: php
- tags: twig, symfony-bundle, template-engine, html-rendering, composer, web-server

## Member repositories
- symfony/twig-bundle (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:56.721211+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:27:08.923903+00:00, confidence not recorded.
  - readme: https://github.com/symfony/twig-bundle (fetched 2026-08-28T04:06:56.721211+00:00, sha e27556bff041)
  - homepage: https://symfony.com/twig-bundle (fetched 2026-08-29T10:09:22.382991+00:00, sha 3632fae12904)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T10:09:22.391901+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/templates.html (fetched 2026-08-29T10:09:22.393972+00:00, sha 33ceaff01d54)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T10:09:22.397061+00:00, sha 2fd410222cfe)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T10:09:22.398975+00:00, sha b626b5bb1423)
- Data as of 2026-08-30T08:39:29.467469+00:00.
