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

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

carter-digital/twig-extensions
==============================

Carter Digital's twig extensions pack

3.0.6(2mo ago)08314MITPHPPHP &gt;=8.2CI failing

Since Mar 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/carter-digital/twig-extensions)[ Packagist](https://packagist.org/packages/carter-digital/twig-extensions)[ RSS](/packages/carter-digital-twig-extensions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (29)Used By (0)

Carter Digital/Wongdoody AU's Twig extensions pack.
===================================================

[](#carter-digitalwongdoody-aus-twig-extensions-pack)

Custom Twig functions used for our websites since 2020.

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

[](#installation)

Should be easily installed using [composer](http://getcomposer.org/)

```
composer require carter-digital/twig-extensions

```

Extensions
----------

[](#extensions)

### PHP function based

[](#php-function-based)

- getenv() - implementation of PHP/Craft's getenv()
- isEnglish() - implementation of PHP's preg\_match to find alphanumeric latin symbols in a string
- manifestFile() - cache busting helper function
- md5() - implemenation of PHP's md5()
- pathinfo() - implementation of PHP's pathinfo()
- uniqueId() - implementation of PHP's rand()

### CraftCMS based

[](#craftcms-based)

- Filters
    - text|t - returns the same text
- Functions
    - svg('filepath') - returns file\_get\_contents() of the filepath

Credits:
--------

[](#credits)

Heavily based on jasny/twig-extensions package.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance85

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~83 days

Recently: every ~94 days

Total

27

Last Release

78d ago

Major Versions

1.3.3 → 2.0.x-dev2023-05-30

2.2 → 3.0.02023-05-31

PHP version history (3 changes)1.0.0PHP &gt;=7.2.1

1.0.1PHP &gt;=7.2.19

2.0.x-devPHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![ricneu](https://avatars.githubusercontent.com/u/1140879?v=4)](https://github.com/ricneu "ricneu (10 commits)")[![rn1988](https://avatars.githubusercontent.com/u/94416670?v=4)](https://github.com/rn1988 "rn1988 (1 commits)")[![tfeloo-hygfosaad](https://avatars.githubusercontent.com/u/7825160?v=4)](https://github.com/tfeloo-hygfosaad "tfeloo-hygfosaad (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/twig-bridge

Provides integration for Twig with various Symfony components

2.5k215.5M600](/packages/symfony-twig-bridge)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[twig/intl-extra

A Twig extension for Intl

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

A Twig extension for Symfony String

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

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[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)
