PHPackages                             modnarlluf/twig-exception - 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. modnarlluf/twig-exception

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

modnarlluf/twig-exception
=========================

Use to make customizables Twig exception pages for routes or specific HTTP status codes

1.1(8y ago)0501MITPHPPHP &gt;=7.0.8

Since Dec 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/modnarlluf/TwigException)[ Packagist](https://packagist.org/packages/modnarlluf/twig-exception)[ RSS](/packages/modnarlluf-twig-exception/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

TwigExceptionBundle
===================

[](#twigexceptionbundle)

About
-----

[](#about)

Use to make customizables Twig exception pages for routes or specific HTTP status codes.

Features
--------

[](#features)

- Change default error templates from routes and status codes
- Enable or disable custom error templates for debug environnement

Configuration
-------------

[](#configuration)

If you need to add custom route handlers, disable the bundle for some environnements or activate custom template for debug mode, you can do it through the configuration.

```
kwrz_twig_exception:
  enabled: true
  with_debug: false
  handlers:
    - { regex: ^\/admin, template: "MyBundle:Admin:error404.html.twig", status_code: [404] }
    - { regex: ^\/admin, template: "MyBundle:Admin:errorDefault.html.twig" }
    - { host: ^member\.domain\.tld, regex: ^\/, template: "MyBundle:Member:errorDefault.html.twig" }
    - { regex: ^\/, template: "MyBundle:Front:errorDefault.html.twig" }

```

Pay attention to the order in which your handlers are declared. There are processed in the same order as in the configuration. If you specify the status\_code array in an handler row, the error template will be used only if the expected response status code is in this array.

By default, the `kwrz_twig_exception.with_debug` option is set to false. If you want to view custom error pages in `kernel.debug` mode, simply set this option to true.

If you want to disable this bundle in some environment, simply set the `kwrz_twig_exception.enabled` option to false.

Installation (Symfony 3.4+)
---------------------------

[](#installation-symfony-34)

Require the `modnarlluf/twig-exception` package in your composer.json and update your dependencies.

```
$ composer require "modnarlluf/twig-exception"

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~203 days

Recently: every ~216 days

Total

7

Last Release

2953d ago

Major Versions

v0.4 → 1.02018-03-05

PHP version history (2 changes)v0.1PHP &gt;=5.3.2

1.0PHP &gt;=7.0.8

### Community

Maintainers

![](https://www.gravatar.com/avatar/eaf694131eaa2c91a892db4d3e4c49ee2b4754e1b41d14641a31198c2b0759c2?d=identicon)[modnarlluf](/maintainers/modnarlluf)

---

Top Contributors

[![jdemangeon](https://avatars.githubusercontent.com/u/1064780?v=4)](https://github.com/jdemangeon "jdemangeon (20 commits)")[![brunonic](https://avatars.githubusercontent.com/u/1011840?v=4)](https://github.com/brunonic "brunonic (2 commits)")[![hjanuschka](https://avatars.githubusercontent.com/u/2891702?v=4)](https://github.com/hjanuschka "hjanuschka (2 commits)")[![modnarlluf](https://avatars.githubusercontent.com/u/1486400?v=4)](https://github.com/modnarlluf "modnarlluf (1 commits)")

---

Tags

twigexceptionviewroute

### Embed Badge

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

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

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91292.0M313](/packages/twig-extra-bundle)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

545.8M69](/packages/symfony-ux-icons)[wyrihaximus/twig-view

Twig powered View for CakePHP

804.7M1](/packages/wyrihaximus-twig-view)[yellowskies/qr-code-bundle

Symfony Barcode &amp; QR Code Generator Bundle with Twig extension

36682.9k](/packages/yellowskies-qr-code-bundle)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

1432.0k](/packages/symfony-ux-toolkit)[boekkooi/jquery-validation-bundle

Jquery form validation bundle for symfony 2

2773.9k1](/packages/boekkooi-jquery-validation-bundle)

PHPackages © 2026

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