PHPackages                             chsxf/twig-tools - 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. chsxf/twig-tools

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

chsxf/twig-tools
================

Extension Tools for Twig

1.0.1(1y ago)0257↓75%1GPL-2.0-onlyPHP

Since Sep 19Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (1)

About This Project
==================

[](#about-this-project)

The main purpose of this package is to extend the capabilities of [Twig](https://twig.symfony.com/) with a collection of tools and extensions.

Conventions
-----------

[](#conventions)

This repository uses [gitmoji](https://gitmoji.dev) for its commit messages.

Available Extensions
====================

[](#available-extensions)

- [`\chsxf\Twig\Extension\Gettext`](README_Gettext.md) provides gettext functions for use in Twig templates
- [`\chsxf\Twig\Extension\Lazy`](README_Lazy.md) provides a Twig tag to temporarily skip strict variable checking
- [`\chsxf\Twig\Extension\SwitchCase`](README_SwitchCase.md) provides a switch case tag implementation for Twig templates

Additional Tools
================

[](#additional-tools)

In complement of the `Gettext` extension, this package provides a tool allowing you to easily extract localized strings from Twig templates through 3rd-party tools like [poedit](https://poedit.net/).

See the [`Gettext` extension's documentation](README_Gettext.md) for further information.

Getting Started
===============

[](#getting-started)

Requirements
------------

[](#requirements)

- Twig 2+

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

[](#installation)

We strongly recommend using [Composer](https://getcomposer.org/) to install this package.

```
composer require chsxf/twig-tools

```

License
=======

[](#license)

Source code is released under the terms of the [GNU General Public License v2](LICENSE) if not specified otherwise.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

724d ago

### Community

Maintainers

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

---

Top Contributors

[![chsxf](https://avatars.githubusercontent.com/u/3322862?v=4)](https://github.com/chsxf "chsxf (13 commits)")

### Embed Badge

![Health badge](/badges/chsxf-twig-tools/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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