PHPackages                             sserbin/twig-linter - 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. sserbin/twig-linter

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

sserbin/twig-linter
===================

Standalone cli twig linter (based on symfony-bridge-twig)

3.1.2(1y ago)13737.9k↓16.4%8[1 PRs](https://github.com/sserbin/twig-linter/pulls)1MITPHPPHP ^7.4|^8.0CI passing

Since Sep 12Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/sserbin/twig-linter)[ Packagist](https://packagist.org/packages/sserbin/twig-linter)[ RSS](/packages/sserbin-twig-linter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (7)Versions (15)Used By (1)

[![Build Status](https://camo.githubusercontent.com/cfde476a520f86f1a69e7c4dc950a0fdb8e784bad18d5ca9071834dffd4a7ab1/68747470733a2f2f7472617669732d63692e636f6d2f7373657262696e2f747769672d6c696e7465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/sserbin/twig-linter)

Intro
=====

[](#intro)

Standalone cli twig linter (heavily based on twig lint command from symfony-bridge), for those who don't use Symfony (if you do, you are better of using Symfony native `lint:twig`)

Installation
============

[](#installation)

```
composer require --dev sserbin/twig-linter:@dev

```

Usage
=====

[](#usage)

```
vendor/bin/twig-linter lint /path/to/your/templates

```

By default `*.twig` files are searched. Pass in `--ext=?` (e.g. `--ext=html`) to override it.

Limitations/known issues
========================

[](#limitationsknown-issues)

Any non-standard twig's functions/filters/tests are ignored during linting. I.e. if there's invocations of undefined filter this will *not* be reported by linter as it doesn't know about your specific twig environment.

If, however, you want it to, you can manually add `LintCommand` to your console application's command set instantiating it with *your* environment.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance52

Moderate activity, may be stable

Popularity46

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 59.4% 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 ~204 days

Recently: every ~363 days

Total

13

Last Release

395d ago

Major Versions

1.0.4 → 2.0.02019-12-23

2.2.0 → 3.0.02021-06-08

PHP version history (4 changes)1.0PHP ~7.1

2.0.0PHP ~7.2

2.2.0PHP ~7.2|~8.0

3.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/606e9a8f60c2eb84491ffef85e09e486d7a3dbb3376cc015bc52965c1f43448b?d=identicon)[sserbin](/maintainers/sserbin)

---

Top Contributors

[![sserbin](https://avatars.githubusercontent.com/u/1689792?v=4)](https://github.com/sserbin "sserbin (38 commits)")[![xvilo](https://avatars.githubusercontent.com/u/390769?v=4)](https://github.com/xvilo "xvilo (14 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (4 commits)")[![jDolba](https://avatars.githubusercontent.com/u/2221925?v=4)](https://github.com/jDolba "jDolba (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![webbj74](https://avatars.githubusercontent.com/u/50980?v=4)](https://github.com/webbj74 "webbj74 (1 commits)")[![hsegnitz](https://avatars.githubusercontent.com/u/2615958?v=4)](https://github.com/hsegnitz "hsegnitz (1 commits)")

---

Tags

hacktoberfestlintertwigtwiglinterlint

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[drupal/core

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

21866.0M1.7k](/packages/drupal-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[pimcore/pimcore

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

3.8k3.8M508](/packages/pimcore-pimcore)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[sulu/sulu

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

1.3k1.4M203](/packages/sulu-sulu)

PHPackages © 2026

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