PHPackages                             mezzio/mezzio-template - 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. mezzio/mezzio-template

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

mezzio/mezzio-template
======================

Template subcomponent for Mezzio

3.0.0(7mo ago)53.8M—2.2%7[1 issues](https://github.com/mezzio/mezzio-template/issues)[2 PRs](https://github.com/mezzio/mezzio-template/pulls)20BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 31Pushed 1mo ago11 watchersCompare

[ Source](https://github.com/mezzio/mezzio-template)[ Packagist](https://packagist.org/packages/mezzio/mezzio-template)[ Docs](https://mezzio.dev)[ Fund](https://funding.communitybridge.org/projects/laminas-project)[ RSS](/packages/mezzio-mezzio-template/feed)WikiDiscussions 3.1.x Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (43)Used By (20)

mezzio-template
===============

[](#mezzio-template)

[![Build Status](https://github.com/mezzio/mezzio-template/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/mezzio/mezzio-template/actions/workflows/continuous-integration.yml)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> [](#-to-citizens-of-russia)
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

Template subcomponent for [Mezzio](https://github.com/mezzio/mezzio).

This package provides the following classes, interfaces, and traits:

- `TemplateRendererInterface`, a generic interface for providing template rendering capabilities.
- `TemplatePath`, a value object describing a (optionally) namespaced path in which templates reside; the `TemplateRendererInterface` returns these.
- `ArrayParametersTrait` provides helper methods you can mix in to implementations for normalizing template parameters to an array.
- `DefaultParamsTrait` provides helper methods you can mix in to implementations for aggregating default parameters as well as merging global, template-specific, and provided parameters when rendering.

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

[](#installation)

Typically, you will install this when installing Mezzio. However, it can be used standalone to provide a generic way to provide templating to your application. To do this, use:

```
$ composer require mezzio/mezzio-template
```

We currently support and provide the following routing integrations:

- [Plates](https://github.com/thephpleague/plates): `composer require mezzio/mezzio-platesrenderer`
- [Twig](http://twig.sensiolabs.org/): `composer require mezzio/mezzio-twigrenderer`
- [Laminas PhpRenderer](https://github.com/laminas/laminas-view): `composer require mezzio/mezzio-laminasviewrenderer`

Documentation
-------------

[](#documentation)

Mezzio provides [template documentation](https://docs.mezzio.dev/mezzio/features/template/intro/).

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance74

Regular maintenance activity

Popularity49

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

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

Recently: every ~41 days

Total

40

Last Release

57d ago

Major Versions

1.0.4 → 2.0.02019-12-31

2.13.0 → 3.0.02025-10-11

PHP version history (10 changes)1.0.0PHP &gt;=5.5

2.0.0PHP ^7.1

2.1.0PHP ^7.3 || ~8.0.0

2.2.0PHP ^7.3 || ~8.0.0 || ~8.1.0

2.5.x-devPHP ^7.4 || ~8.0.0 || ~8.1.0

2.6.x-devPHP ~8.0.0 || ~8.1.0 || ~8.2.0

2.8.x-devPHP ~8.1.0 || ~8.2.0

2.9.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

2.11.x-devPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

2.14.x-devPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25943?v=4)[Matthew Weier O'Phinney](/maintainers/weierophinney)[@weierophinney](https://github.com/weierophinney)

![](https://avatars.githubusercontent.com/u/296074?v=4)[Zend Framework](/maintainers/zendframework)[@zendframework](https://github.com/zendframework)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (194 commits)")[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (78 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (49 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (40 commits)")[![geerteltink](https://avatars.githubusercontent.com/u/9497586?v=4)](https://github.com/geerteltink "geerteltink (19 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (10 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (10 commits)")[![Xerkus](https://avatars.githubusercontent.com/u/725842?v=4)](https://github.com/Xerkus "Xerkus (6 commits)")[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (5 commits)")[![Koopzington](https://avatars.githubusercontent.com/u/3015529?v=4)](https://github.com/Koopzington "Koopzington (3 commits)")[![laminas-bot](https://avatars.githubusercontent.com/u/68250880?v=4)](https://github.com/laminas-bot "laminas-bot (3 commits)")[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (2 commits)")[![fezfez](https://avatars.githubusercontent.com/u/1162307?v=4)](https://github.com/fezfez "fezfez (1 commits)")[![PowerKiKi](https://avatars.githubusercontent.com/u/72603?v=4)](https://github.com/PowerKiKi "PowerKiKi (1 commits)")[![alexraputa](https://avatars.githubusercontent.com/u/10957915?v=4)](https://github.com/alexraputa "alexraputa (1 commits)")[![arueckauer](https://avatars.githubusercontent.com/u/1815979?v=4)](https://github.com/arueckauer "arueckauer (1 commits)")[![alucic](https://avatars.githubusercontent.com/u/1689028?v=4)](https://github.com/alucic "alucic (1 commits)")[![boesing](https://avatars.githubusercontent.com/u/2189546?v=4)](https://github.com/boesing "boesing (1 commits)")

---

Tags

hacktoberfesttemplatetemplate-renderinglaminastemplatemezzio

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mezzio-mezzio-template/health.svg)

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

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.6k34.7M186](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

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