PHPackages                             symplify/template-checker - 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. symplify/template-checker

Abandoned → [symplify/easy-ci](/?search=symplify%2Feasy-ci)ArchivedLibrary[Templating &amp; Views](/categories/templating)

symplify/template-checker
=========================

Check your TWIG templates

v9.2.6(5y ago)28.8kMITPHPPHP &gt;=7.3

Since Jul 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/deprecated-packages/template-checker)[ Packagist](https://packagist.org/packages/symplify/template-checker)[ RSS](/packages/symplify-template-checker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (109)Used By (0)

Template Checker
================

[](#template-checker)

[![Downloads total](https://camo.githubusercontent.com/f33118aa694ba9cbf07a4fe624010237fdfcc0c35cbccbbdd63e14ce2761d04a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f74656d706c6174652d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/template-checker/stats)

Check your TWIG templates

Install
-------

[](#install)

```
composer require symplify/template-checker --dev
```

Usage
-----

[](#usage)

### Check Latte Templates

[](#check-latte-templates)

- for existing classes
- for existing class constants
- for existing static calls

```
vendor/bin/template-checker check-latte-template templates
```

### Check Twig Controller Paths

[](#check-twig-controller-paths)

```
final class SomeController
{
    public function index()
    {
        return $this->render('does_path_exist.twig');
    }
}
```

```
vendor/bin/template-checker check-twig-render src/Controller
```

### Extract Static Calls from Latte Templates to FilterProvider

[](#extract-static-calls-from-latte-templates-to-filterprovider)

Do you have a static call in your template? It's a hidden filter. Let's decouple it so we can use DI and services as in the rest of project:

```
vendor/bin/template-checker extract-latte-static-call-to-filter templates
```

But that's just a dry run... how to apply changes?

```
vendor/bin/template-checker extract-latte-static-call-to-filter templates --fix
```

What happens? The static call will be replaced by a Latte filter:

```
 # any latte file
-{\App\SomeClass::someStaticMethod($value)}
+{$value|someStaticMethod}
```

The filter will be provided

```
use App\Contract\Latte\FilterProviderInterface;
use App\SomeClass;

final class SomeMethodFilterProvider implements FilterProviderInterface
{
    public const FILTER_NAME = 'someMethod';

    public function __invoke(string $name): int
    {
        return SomeClass::someStaticMethod($name);
    }

    public function getName(): string
    {
        return self::FILTER_NAME;
    }
}
```

The file will be generated into `/generated` directory. Just rename namespaces and copy it to your workflow.

Do you want to know more about **clean Latte filters**? Read [How to Get Rid of Magic, Static and Chaos from Latte Filters](https://tomasvotruba.com/blog/2020/08/17/how-to-get-rid-of-magic-static-and-chaos-from-latte-filters/)

Report Issues
-------------

[](#report-issues)

In case you are experiencing a bug or want to request a new feature head over to the [Symplify monorepo issue tracker](https://github.com/symplify/symplify/issues)

Contribute
----------

[](#contribute)

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on [symplify/symplify](https://github.com/symplify/symplify).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~2 days

Total

107

Last Release

1896d ago

Major Versions

0.4.2 → 9.0.0-BETA22020-11-23

PHP version history (4 changes)v0.3.26PHP ^7.2

0.3.33PHP ^7.2|^8.0

0.3.34PHP &gt;=7.2

9.0.0-rc1PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symplify-template-checker/health.svg)

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

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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