百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

mezzio

> 编程语言
开源

PSR-15 中间件微框架

397 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

PSR-15 中间件微框架

mezzio

Develop PSR-7 middleware applications in minutes!

mezzio builds on laminas-stratigility to provide a minimalist PSR-7 middleware framework for PHP, with the following features:

  • Routing. Choose your own router; we support:
    • FastRoute
    • laminas-router
  • DI Containers, via PSR-11 Container. Middleware matched via routing is retrieved from the composed container.
  • Optionally, templating. We support:
    • Plates
    • Twig
    • Laminas's PhpRenderer

Installation

We provide two ways to install Mezzio, both using Composer: via our skeleton project and installer, or manually.

Using the skeleton + installer

The simplest way to install and get started is using the skeleton project, which includes installer scripts for choosing a router, dependency injection container, and optionally a template renderer and/or error handler. The skeleton also provides configuration for officially supported dependencies.

To use the skeleton, use Composer's create-project command:

bash
composer create-project mezzio/mezzio-skeleton 

This will prompt you through choosing your dependencies, and then create and install the project in the (omitting the will create and install in a mezzio-skeleton/ directory).

Manual Composer installation

You can install Mezzio standalone using Composer:

bash
composer require mezzio/mezzio

However, at this point, Mezzio is not usable, as you need to supply minimally:

  • a router.
  • a dependency injection container.

We currently support and provide the following routing integrations:

  • FastRoute: composer require mezzio/mezzio-fastroute
  • laminas-router: composer require mezzio/mezzio-laminasrouter

We recommend using a dependency injection container, and typehint against PSR-11 Container. We can recommend the following implementations:

  • laminas-servicemanager: composer require laminas/laminas-servicemanager
  • Pimple (see docs for more details): composer require laminas/laminas-pimple-config
  • Aura.Di (see docs for more details): composer require laminas/laminas-auradi-config

Additionally, you may optionally want to install a template renderer implementation, and/or an error handling integration. These are covered in the documentation.

Documentation

Documentation is in the doc tree, and can be compiled using mkdocs:

bash
mkdocs build

Additionally, public-facing, browseable documentation is available at

Issues· 24 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPmiddlewaremiddleware-frameworkpsr-15

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言