PHPackages                             ceus-media/template-abstraction - 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. ceus-media/template-abstraction

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

ceus-media/template-abstraction
===============================

0.6.0(1y ago)1311GPL-3.0+PHPPHP ^8.3CI failing

Since Sep 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/CeusMedia/TemplateAbstraction)[ Packagist](https://packagist.org/packages/ceus-media/template-abstraction)[ RSS](/packages/ceus-media-template-abstraction/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (15)Versions (11)Used By (1)

Template Abstraction
====================

[](#template-abstraction)

This library provides an abstraction layer for template engines.

[![PHP version](https://camo.githubusercontent.com/7ebb0279547d526a54d318d9ab47d214fc6a36936050d77b00e120c3ce9db3f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c75653f7374796c653d666c61742d73717561726526636f6c6f723d373737424234)](https://camo.githubusercontent.com/7ebb0279547d526a54d318d9ab47d214fc6a36936050d77b00e120c3ce9db3f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c75653f7374796c653d666c61742d73717561726526636f6c6f723d373737424234)[![License](https://camo.githubusercontent.com/6a144bd9351107868ce1efe3f0e5ea90344aa2279afddd2e93435590eaf630a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636575732d6d656469612f74656d706c6174652d6162737472616374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ceus-media/template-abstraction)[![PHPStan level](https://camo.githubusercontent.com/9984e4473ea56a498868ac5a3ffe61ded3a318f72f3deac309709cd1324b9263/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e5f6c6576656c2d6d61782b7374726963742d6461726b677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/9984e4473ea56a498868ac5a3ffe61ded3a318f72f3deac309709cd1324b9263/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e5f6c6576656c2d6d61782b7374726963742d6461726b677265656e3f7374796c653d666c61742d737175617265)

[![Branch](https://camo.githubusercontent.com/111907174dbee71200e92e00dcb89b58c1d41e9c115bea532c470c0794492fea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4272616e63682d302e352e782d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/111907174dbee71200e92e00dcb89b58c1d41e9c115bea532c470c0794492fea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4272616e63682d302e352e782d626c75653f7374796c653d666c61742d737175617265)[![Release](https://camo.githubusercontent.com/026ddd65ab1aadbe025c4c30b2833e44118d119bd1a28e5a5bbc5c3098a1a2be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656c656173652d302e342e302d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/026ddd65ab1aadbe025c4c30b2833e44118d119bd1a28e5a5bbc5c3098a1a2be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656c656173652d302e342e302d626c75653f7374796c653d666c61742d737175617265)[![Package version](https://camo.githubusercontent.com/077557072288666981181f06d9da43484f883087b0da71c3f8592ee6ce4b17f8/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636575732d6d656469612f74656d706c6174652d6162737472616374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ceus-media/template-abstraction)

[![Commit date](https://camo.githubusercontent.com/ef82c825b562926676f648fc6878ff814f3fae8ebac4ca5bc70cd97fe3841cfa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f436575734d656469612f54656d706c6174654162737472616374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/CeusMedia/TemplateAbstraction)[![Monthly downloads](https://camo.githubusercontent.com/49b8e6809850800f1c07ea486baa285291fc1f4b2e09955a40fc1dcc50b8129f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636575732d6d656469612f74656d706c6174652d6162737472616374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ceus-media/template-abstraction)

Goals
-----

[](#goals)

Goals of this abstraction layer:

1. to be able to replace the currently used template engine within your project
2. to be able to use several template engines side by side within your project
3. allow several developers of your project to use the template engine they like
4. improve performance of your project by using different template engines for different tasks
5. avoid/ignore template engine file extensions (like .pug or .haml)
6. autodetect which template engine to use

To reach these goals, this library provides a clean interface to render templates using several available template engines in the background.

Template Engines
----------------

[](#template-engines)

Currently supported template engines are:

- **Twig** [Package](https://packagist.org/packages/twig/twig) [Source](https://github.com/twigphp/Twig) [Page](https://twig.symfony.com/doc/3.x/templates.html)
- **Dwoo** [Package](https://packagist.org/packages/dwoo/dwoo) [Source](https://github.com/dwoo-project/dwoo)
- **Smarty** [Package](https://packagist.org/packages/smarty/smarty) [Source](https://github.com/smarty-php/smarty)
- **PHPTAL** [Package](https://packagist.org/packages/phptal/phptal) [Source](https://github.com/phptal/PHPTAL)
- **phpHaml** [Package](https://packagist.org/packages/kriss0r/php-haml) [Source](https://github.com/kriss0r/phphaml) [Page](http://phphaml.sourceforge.net/)
- **Latte** [Package](https://packagist.org/packages/latte/latte) [Source](https://github.com/nette/latte) [Page](https://latte.nette.org/)
- **Mustache** [Package](https://packagist.org/packages/mustache/mustache) [Source](https://github.com/bobthecow/mustache.php) [Page](https://github.com/bobthecow/mustache.php)
- **H2O** [Package](https://packagist.org/packages/blesta/h2o) [Source](https://github.com/blesta/h2o)

Upcoming versions will also support:

- Pug / Jade

Todos
-----

[](#todos)

### Add Template Engines

[](#add-template-engines)

#### Add phug

[](#add-phug)

phug = pug-php = ex-jade

- [Package](https://packagist.org/packages/pug-php/pug)
- [Source](https://github.com/pug-php/pug)
- [Page](https://www.phug-lang.com/)

#### Add tale-pug

[](#add-tale-pug)

tale-pug = ex-tale-jade = ex-jade

- [Package](https://packagist.org/packages/talesoft/tale-pug)
- [Source](https://github.com/Talesoft/tale-pug)
- [Page](http://jade.talesoft.codes/)

---

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity74

Established project with proven stability

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

Recently: every ~70 days

Total

10

Last Release

461d ago

PHP version history (5 changes)0.1PHP ^5.3 | ^7

0.2PHP ^7.3 | ^8

0.4.0PHP ^7.4 | ^8

0.5.0PHP ^8.1

0.6.0PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![kriss0r](https://avatars.githubusercontent.com/u/476914?v=4)](https://github.com/kriss0r "kriss0r (161 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ceus-media-template-abstraction/health.svg)

```
[![Health](https://phpackages.com/badges/ceus-media-template-abstraction/health.svg)](https://phpackages.com/packages/ceus-media-template-abstraction)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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