PHPackages                             cedricziel/twig-loader-flysystem - 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. cedricziel/twig-loader-flysystem

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

cedricziel/twig-loader-flysystem
================================

Flysystem loader for the twig templating language

v1.1.0(9y ago)61453MITPHPPHP ~5.5|~7.0

Since Jul 6Pushed 9y ago2 watchersCompare

[ Source](https://github.com/cedricziel/twig-loader-flysystem)[ Packagist](https://packagist.org/packages/cedricziel/twig-loader-flysystem)[ Docs](https://github.com/cedricziel/twig-loader-flysystem)[ RSS](/packages/cedricziel-twig-loader-flysystem/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (3)Used By (0)

Twig loader for flysystem filesystems
=====================================

[](#twig-loader-for-flysystem-filesystems)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5491724dffed72d9991e976ab3c4fe2a3188f5e68c9b381625cd1159b6e8b0dc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6365647269637a69656c2f747769672d6c6f616465722d666c7973797374656d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/cedricziel/twig-loader-flysystem/?branch=master) [![Build Status](https://camo.githubusercontent.com/f2889a1ebf9d2e3d71826f144711a9eb029d5d9ce4947f8d60fe8cab49e651fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6365647269637a69656c2f747769672d6c6f616465722d666c7973797374656d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/cedricziel/twig-loader-flysystem/build-status/master)

[Flysystem](http://flysystem.thephpleague.com/) loader for the [Twig](http://twig.sensiolabs.org/) templating engine.

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

[](#installation)

The library is installable through composer:

```
composer require cedricziel/twig-loader-flysystem
```

Usage
-----

[](#usage)

Adapted from the [official Twig documentation](http://twig.sensiolabs.org/doc/api.html#basics)

```
$localAdapter = new League\Flysystem\Adapter\Local(__DIR__);
$filesystem = League\Flysystem\Filesystem($localAdapter);

$loader = new CedricZiel\TwigLoaderFlysystem\FlysystemLoader($filesystem);
$twig = new \Twig_Environment($loader);

$template = $twig->loadTemplate('index.html.twig');
$content = $template->render(array('the' => 'variables', 'go' => 'here'));
```

The loader also supports using a subdirectory on the associated flysystem as permanent prefix:

```
$localAdapter = new League\Flysystem\Adapter\Local(__DIR__);
$filesystem = League\Flysystem\Filesystem($localAdapter);

$loader = new CedricZiel\TwigLoaderFlysystem\FlysystemLoader($filesystem, 'templates');
$twig = new \Twig_Environment($loader);

// this will load 'templates/index.html.twig' from the current flysystem filesystem
$template = $twig->loadTemplate('index.html.twig');
$content = $template->render(array('the' => 'variables', 'go' => 'here'));
```

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.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 ~50 days

Total

2

Last Release

3596d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ac8297e12671d91305ec01ab56add8cb141fa82d678ba96f0012eeb7f88ea0c?d=identicon)[cedricziel](/maintainers/cedricziel)

---

Top Contributors

[![cedricziel](https://avatars.githubusercontent.com/u/418970?v=4)](https://github.com/cedricziel "cedricziel (14 commits)")[![HaaseIT](https://avatars.githubusercontent.com/u/7584444?v=4)](https://github.com/HaaseIT "HaaseIT (1 commits)")

---

Tags

flysystemtwigfilesystemFlysystemtwigloadertemplates

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/cedricziel-twig-loader-flysystem/health.svg)

```
[![Health](https://phpackages.com/badges/cedricziel-twig-loader-flysystem/health.svg)](https://phpackages.com/packages/cedricziel-twig-loader-flysystem)
```

###  Alternatives

[twig/intl-extra

A Twig extension for Intl

36567.2M322](/packages/twig-intl-extra)[symfony/ux-twig-component

Twig components for Symfony

22017.2M313](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1636.5M116](/packages/symfony-ux-live-component)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22919.7M82](/packages/twig-cssinliner-extra)[twig/markdown-extra

A Twig extension for Markdown

12115.5M120](/packages/twig-markdown-extra)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

1682.8k1](/packages/symfony-ux-toolkit)

PHPackages © 2026

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