PHPackages                             parisek/twig-common - 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. parisek/twig-common

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

parisek/twig-common
===================

A Twig extension with common functions and filters

v1.1.0(1y ago)01.7k↑1337.5%1GPL-2.0-or-laterPHP

Since Aug 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/parisek/twig-common)[ Packagist](https://packagist.org/packages/parisek/twig-common)[ Docs](https://github.com/parisek/twig-common)[ RSS](/packages/parisek-twig-common/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (2)Versions (7)Used By (1)

Twig Common Extension
=====================

[](#twig-common-extension)

Installation
------------

[](#installation)

Twig Common Extension can be easily installed using [composer](http://getcomposer.org/)

```
composer require parisek/twig-common

```

Usage
-----

[](#usage)

```
$twig = new Twig_Environment($loader);
$twig->addExtension(new Parisek\Twig\CommonExtension());
```

Filters
-------

[](#filters)

Will load YAML to variable

```
{% set sidebar = source('sidebar.yml')|yaml_parse %}
```

Will return content without translation (useful for debug without translation extension)

```
{{ "Hello"|t }}
```

Functions
---------

[](#functions)

Will generate unique ID on the page

```
{{ uniqueId() }}
```

Tokens
------

[](#tokens)

Will return content without translation (useful for debug without translation extension)

```
{% trans with {'context': 'domain name'} %}{{ variable }}{% endtrans %}
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~230 days

Recently: every ~288 days

Total

6

Last Release

632d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f60a7484412a046d60bd8de9c5fb773cd9d59f00a1b455284fa718b786a4d93?d=identicon)[parisek](/maintainers/parisek)

---

Top Contributors

[![parisek](https://avatars.githubusercontent.com/u/10908003?v=4)](https://github.com/parisek "parisek (9 commits)")

---

Tags

phptwigtwig-extensiontwig

### Embed Badge

![Health badge](/badges/parisek-twig-common/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[drupal/core

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

21866.0M1.7k](/packages/drupal-core)[symfony/ux-twig-component

Twig components for Symfony

22018.6M356](/packages/symfony-ux-twig-component)[symfony/ux-toolkit

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

16126.1k1](/packages/symfony-ux-toolkit)[symfony/ux-live-component

Live components for Symfony

1647.0M127](/packages/symfony-ux-live-component)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)

PHPackages © 2026

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