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)0254↓71.4%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 1mo ago

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

29

—

LowBetter than 59% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

678d 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

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91292.0M315](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36663.2M221](/packages/twig-intl-extra)[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[twig/string-extra

A Twig extension for Symfony String

21946.0M133](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21814.8M162](/packages/symfony-ux-twig-component)

PHPackages © 2026

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