PHPackages                             core23/twig-extensions - 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. core23/twig-extensions

Abandoned → [nucleos/twig-extensions](/?search=nucleos%2Ftwig-extensions)Library[Templating &amp; Views](/categories/templating)

core23/twig-extensions
======================

Useful extensions for twig.

1.4.1(6y ago)510.0k2[3 issues](https://github.com/nucleos/twig-extensions/issues)1MITPHPPHP ^7.2CI passing

Since Dec 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nucleos/twig-extensions)[ Packagist](https://packagist.org/packages/core23/twig-extensions)[ Docs](https://core23.de)[ Fund](https://donate.core23.de)[ GitHub Sponsors](https://github.com/core23)[ RSS](/packages/core23-twig-extensions/feed)WikiDiscussions 3.7.x Synced 3w ago

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

Twig Extensions
===============

[](#twig-extensions)

[![Latest Stable Version](https://camo.githubusercontent.com/bd9109bfaef89f18f27c9204e6d771616fc3d9853c60dbe253b538c1c73350a5/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f747769672d657874656e73696f6e732f762f737461626c65)](https://packagist.org/packages/nucleos/twig-extensions)[![Latest Unstable Version](https://camo.githubusercontent.com/96d822c00ae34b43d7da550aec51c4e9d28705671e9804dff35d5d02b4b43ed9/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f747769672d657874656e73696f6e732f762f756e737461626c65)](https://packagist.org/packages/nucleos/twig-extensions)[![License](https://camo.githubusercontent.com/c005374feb42223483c3eb766682318ae16b2d5f2253938a2cea7a67d4494254/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f747769672d657874656e73696f6e732f6c6963656e7365)](LICENSE.md)

[![Total Downloads](https://camo.githubusercontent.com/39c442b00e8cbbfe34b7cedb3cce4b8df8444bb4430cb874edccda43b25fb747/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f747769672d657874656e73696f6e732f646f776e6c6f616473)](https://packagist.org/packages/nucleos/twig-extensions)[![Monthly Downloads](https://camo.githubusercontent.com/a770c5d3d6355634c830babe1c9fbdd7328a781a05a9756ce12d13d220a19d18/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f747769672d657874656e73696f6e732f642f6d6f6e74686c79)](https://packagist.org/packages/nucleos/twig-extensions)[![Daily Downloads](https://camo.githubusercontent.com/f90d782a841c231c92e01fb0250e076bbc924851cbe4daf930d7ea868cd0d245/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f747769672d657874656e73696f6e732f642f6461696c79)](https://packagist.org/packages/nucleos/twig-extensions)

[![Continuous Integration](https://github.com/nucleos/nucleos-twig-extensions/actions/workflows/continuous-integration.yml/badge.svg?event=push)](https://github.com/nucleos/nucleos-twig-extensions/actions?query=workflow%3A%22Continuous+Integration%22+event%3Apush)[![Code Coverage](https://camo.githubusercontent.com/8c5bca80f1620059f4e1166b2ff8ab08a8c0e99bb670c93c3096ed55dec5ad25/68747470733a2f2f636f6465636f762e696f2f67682f6e75636c656f732f6e75636c656f732d747769672d657874656e73696f6e732f67726170682f62616467652e737667)](https://codecov.io/gh/nucleos/nucleos-twig-extensions)

Useful extensions for twig.

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

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:

```
composer require nucleos/twig-extensions

```

Symfony usage
-------------

[](#symfony-usage)

If you want to use this library inside symfony, you can use a bridge.

### Enable the Bundle

[](#enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Nucleos\Twig\Bridge\Symfony\Bundle\NucleosTwigBundle::class => ['all' => true],
];
```

### Twig text spam protection

[](#twig-text-spam-protection)

The Twig filter `spamsecure` replaces all dot and @-signs.

```
{# Replace plain text #}
{{ text|spamsecure }}

{# Replace rich text mails #}
{{ htmlText|spamsecure(true) }}
```

### Configure the Bundle

[](#configure-the-bundle)

Create a configuration file called `nucleos_twig.yaml`:

```
# config/packages/nucleos_twig.yaml

nucleos_twig:
    secure:
        mail:
            at_text:   [ ' [AT] ', ' (AT) ', ' [ÄT] ' ]
            dot_text:  [ ' [DOT] ', ' (DOT) ', ' [.] ' ]
```

License
-------

[](#license)

This library is under the [MIT license](LICENSE.md).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance44

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~109 days

Total

11

Last Release

2292d ago

Major Versions

0.3.1 → 1.0.02018-10-06

PHP version history (2 changes)0.1.0PHP ^7.1

1.1.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3440437?v=4)[Christian Gripp](/maintainers/core23)[@core23](https://github.com/core23)

---

Top Contributors

[![core23](https://avatars.githubusercontent.com/u/3440437?v=4)](https://github.com/core23 "core23 (344 commits)")[![nucleos-bot](https://avatars.githubusercontent.com/u/60489587?v=4)](https://github.com/nucleos-bot "nucleos-bot (316 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (308 commits)")[![kodiakhq[bot]](https://avatars.githubusercontent.com/in/29196?v=4)](https://github.com/kodiakhq[bot] "kodiakhq[bot] (41 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (11 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

hacktoberfestlibrarysymfonysymfony-bridgetwigtwig-extensionsymfonytwigtwig-extensionsymfony-bridge

### Embed Badge

![Health badge](/badges/core23-twig-extensions/health.svg)

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

###  Alternatives

[symfony/twig-bridge

Provides integration for Twig with various Symfony components

2.5k225.1M710](/packages/symfony-twig-bridge)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[drupal/core-recommended

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

6941.5M396](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M517](/packages/shopware-core)[contao-community-alliance/dc-general

Universal data container for Contao

1579.5k90](/packages/contao-community-alliance-dc-general)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

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

PHPackages © 2026

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