PHPackages                             allocine/twigcs - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. allocine/twigcs

Abandoned → [friendsoftwig/twigcs](/?search=friendsoftwig%2Ftwigcs)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

allocine/twigcs
===============

Checkstyle automation for Twig

v3.1.3(7y ago)1131.2k↓74.8%6MITPHPPHP ^7.0

Since Oct 12Pushed 6y agoCompare

[ Source](https://github.com/allocine/twigcs)[ Packagist](https://packagist.org/packages/allocine/twigcs)[ RSS](/packages/allocine-twigcs/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (22)Used By (6)

Twigcs
======

[](#twigcs)

The missing checkstyle for twig !

Twigcs aims to be what phpcs is to php. It checks your codebase for violations on coding standards.

Please note that the project is still in early development stage and is subject to heavy changes.

How to install
--------------

[](#how-to-install)

```
composer global require allocine/twigcs
```

How to run
----------

[](#how-to-run)

Basically, just run :

```
twigcs /path/to/views
```

On Symfony projects, you can run, for instance :

```
twigcs /project/dir/app/Resources/views
```

You will get a summary of the violations in the console. The exit code of the command is based on the severity of any violation found. By default, twigcs won't even tolerate a notice, this can be changed at run time :

```
twigcs /path/to/views --severity warning # Allow notices
```

With the example above, notices are still displayed but not altering the exit code.

### Continuous Integration

[](#continuous-integration)

Twigcs can be used with your favorite CI server. The command itself will return a consistent exit code telling the CI job if it failed or succeeded. You can also have a nice xml report (checkstyle format) :

```
twigcs /path/to/views --reporter checkstyle > /path/to/report.xml
```

### Coding standard

[](#coding-standard)

At the moment the only available standard is the [official one from twig](http://twig.sensiolabs.org/doc/coding_standards.html).

#### Custom coding standard

[](#custom-coding-standard)

You can create a class implementing `RulesetInterface` and supply it as a `--ruleset` option to the CLI script:

```
twigcs /path/to/views --ruleset \MyApp\TwigCsRuleset
```

*Note:* `twigcs` needs to be used via composer and the ruleset class must be reachable via composer's autoloader for this feature to work.

### Coming features

[](#coming-features)

- Indentation checking
- Configurable coding standards

### Contributing

[](#contributing)

The master is the development branch, if you find any bug or false positive during style checking, please open an issue or submit a pull request.

When creating or changing a class, don't forget to add you as an `@author` at the top of the file.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 85% 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 ~58 days

Recently: every ~45 days

Total

13

Last Release

2853d ago

Major Versions

1.x-dev → 2.0.02017-01-09

v2.1.0 → v3.0.02018-01-10

PHP version history (2 changes)v2.1.0PHP ~7.0

v3.0.0PHP ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10668964?v=4)[allocine - boxoffice](/maintainers/allocine)[@allocine](https://github.com/allocine)

---

Top Contributors

[![OwlyCode](https://avatars.githubusercontent.com/u/1631270?v=4)](https://github.com/OwlyCode "OwlyCode (51 commits)")[![Chi-teck](https://avatars.githubusercontent.com/u/673139?v=4)](https://github.com/Chi-teck "Chi-teck (2 commits)")[![tomasfejfar](https://avatars.githubusercontent.com/u/642928?v=4)](https://github.com/tomasfejfar "tomasfejfar (2 commits)")[![gfilliere](https://avatars.githubusercontent.com/u/1927105?v=4)](https://github.com/gfilliere "gfilliere (1 commits)")[![benatespina](https://avatars.githubusercontent.com/u/3951376?v=4)](https://github.com/benatespina "benatespina (1 commits)")[![stmh](https://avatars.githubusercontent.com/u/319208?v=4)](https://github.com/stmh "stmh (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![2no](https://avatars.githubusercontent.com/u/305405?v=4)](https://github.com/2no "2no (1 commits)")

---

Tags

b2c

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/allocine-twigcs/health.svg)

```
[![Health](https://phpackages.com/badges/allocine-twigcs/health.svg)](https://phpackages.com/packages/allocine-twigcs)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[drupal/core

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

21866.0M1.7k](/packages/drupal-core)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[open-dxp/opendxp

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

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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