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.0k↓100%2[2 issues](https://github.com/nucleos/twig-extensions/issues)[1 PRs](https://github.com/nucleos/twig-extensions/pulls)MITPHPPHP ^7.2

Since Dec 1Pushed 1mo 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.6.x Synced 1mo ago

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

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

43

—

FairBetter than 91% of packages

Maintenance51

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community16

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

2247d 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://www.gravatar.com/avatar/46179d0f1a863a1a71c634a413d857f8428ad9a8273cd065ba4f0e864730dde9?d=identicon)[core23](/maintainers/core23)

---

Top Contributors

[![core23](https://avatars.githubusercontent.com/u/3440437?v=4)](https://github.com/core23 "core23 (342 commits)")[![nucleos-bot](https://avatars.githubusercontent.com/u/60489587?v=4)](https://github.com/nucleos-bot "nucleos-bot (314 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] (10 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

[twig/string-extra

A Twig extension for Symfony String

21946.0M132](/packages/twig-string-extra)[oro/twig-inspector

Oro Twig Inspector adds the possibility to find twig templates and blocks used for rendering HTML pages faster during development

47532.6k14](/packages/oro-twig-inspector)[nucleos/antispam-bundle

This bundle provides some basic features to reduce spam in symfony forms.

52105.1k](/packages/nucleos-antispam-bundle)[oskarstark/symfony-http-responder

This library provides a Symfony responder class, which can be used to render a template, return json or a file and redirect to route/url.

13811.0k2](/packages/oskarstark-symfony-http-responder)[dms/twig-extension-bundle

DMS Twig Extension Bundle, leverages Fabien Potencier's extra twig extensions for your website.

19296.3k](/packages/dms-twig-extension-bundle)

PHPackages © 2026

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