mezzio / mezzio
PSR-15 中间件微框架
3.19.1
2024-07-18 21:48 UTC
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0
- fig/http-message-util: ^1.1.5
- laminas/laminas-httphandlerrunner: ^2.1
- laminas/laminas-stratigility: ^3.5
- mezzio/mezzio-router: ^3.7
- mezzio/mezzio-template: ^2.2
- psr/container: ^1.0||^2.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0.1 || ^2.0.0
- psr/http-server-middleware: ^1.0
- webmozart/assert: ^1.10
Requires (Dev)
- filp/whoops: ^2.15.4
- laminas/laminas-coding-standard: ~2.5.0
- laminas/laminas-diactoros: ^3.3.1
- laminas/laminas-servicemanager: ^3.22.1
- mezzio/mezzio-aurarouter: ^3.7
- mezzio/mezzio-fastroute: ^3.11
- mezzio/mezzio-laminasrouter: ^3.9
- phpunit/phpunit: ^10.5.28
- psalm/plugin-phpunit: ^0.19.0
- vimeo/psalm: ^5.25.0
Suggests
- filp/whoops: ^2.1 to use the Whoops error handler
- laminas/laminas-auradi-config: ^2.0 to use Aura.Di dependency injection container
- laminas/laminas-pimple-config: ^1.0 to use Pimple for dependency injection container
- laminas/laminas-servicemanager: ^3.3 to use laminas-servicemanager for dependency injection
- mezzio/mezzio-helpers: ^3.0 for its UrlHelper, ServerUrlHelper, and BodyParseMiddleware
- mezzio/mezzio-tooling: ^1.0 for migration and development tools; require it with the --dev flag
- psr/http-message-implementation: Please install a psr/http-message-implementation to consume Mezzio; e.g., laminas/laminas-diactoros
Conflicts
- container-interop/container-interop: <1.2.0
- filp/whoops: <2.14.4
- laminas/laminas-diactoros: <1.7.1
- laminas/laminas-http: <2.15.0
- laminas/laminas-router: <3.5.0
- laminas/laminas-stdlib: <3.6.0
- zendframework/zend-expressive: *
- 4.0.x-dev
- 3.20.x-dev
- 3.19.x-dev
- 3.19.1
- 3.19.0
- 3.18.x-dev
- 3.18.0
- 3.17.x-dev
- 3.17.0
- 3.16.x-dev
- 3.16.3
- 3.16.2
- 3.16.1
- 3.16.0
- 3.15.x-dev
- 3.15.0
- 3.14.x-dev
- 3.14.0
- 3.13.x-dev
- 3.13.0
- 3.12.x-dev
- 3.12.0
- 3.11.x-dev
- 3.11.0
- 3.10.x-dev
- 3.10.0
- 3.9.x-dev
- 3.9.0
- 3.8.x-dev
- 3.8.0
- 3.7.x-dev
- 3.7.0
- 3.6.x-dev
- 3.6.1
- 3.6.0
- 3.5.x-dev
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.x-dev
- 3.4.1
- 3.4.0
- 3.3.x-dev
- 3.3.1
- 3.3.0
- 3.2.x-dev
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0rc5
- 3.0.0rc4
- 3.0.0rc3
- 3.0.0rc2
- 3.0.0rc1
- 3.0.0alpha9
- 3.0.0alpha8
- 3.0.0alpha7
- 3.0.0alpha6
- 3.0.0alpha5
- 3.0.0alpha4
- 3.0.0alpha3
- 3.0.0alpha2
- 3.0.0alpha1
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0rc7
- 1.0.0rc6
- 1.0.0rc5
- 1.0.0rc4
- 1.0.0rc3
- 1.0.0rc2
- 1.0.0rc1
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- dev-renovate/lock-file-maintenance
- dev-renovate/major-laminas
- dev-renovate/phpunit-phpunit-11.x
- dev-extend-error-handling-docs
- dev-rename-body-parsing-middleware-docs-to-body-params-middleware
- dev-add-note-about-usage-of-body-params-middleware-for-put-requests
This package is auto-updated.
Last update: 2024-09-16 01:55:43 UTC
README
在几分钟内开发PSR-7中间件应用程序!
mezzio基于laminas-stratigility构建,为PHP提供了一个极简的PSR-7中间件框架,具有以下特性
- 路由。选择自己的路由器;我们支持
- 通过PSR-11 容器使用DI容器。通过路由匹配的中间件从组合容器中检索。
- 可选,模板化。我们支持
安装
我们提供两种方式来安装Mezzio,两种方式都使用Composer:通过我们的骨架项目和安装程序,或手动。
使用骨架+安装程序
安装和开始使用最简单的方法是使用骨架项目,该项目包括用于选择路由器、依赖注入容器、可选的模板渲染器和/或错误处理器的安装脚本。骨架还提供了官方支持的依赖项的配置。
要使用骨架,请使用Composer的create-project
命令
composer create-project mezzio/mezzio-skeleton <project dir>
这将引导您选择依赖项,然后在<project dir>
(省略<project dir>
将在mezzio-skeleton/
目录中创建和安装)中创建和安装项目。
手动Composer安装
您可以使用Composer独立安装Mezzio
composer require mezzio/mezzio
但是,在此阶段,Mezzio不可用,因为您需要提供
- 一个路由器。
- 一个依赖注入容器。
我们目前支持并提供了以下路由集成
- FastRoute:
composer require mezzio/mezzio-fastroute
- laminas-router:
composer require mezzio/mezzio-laminasrouter
我们建议使用依赖注入容器,并针对PSR-11 容器进行类型提示。我们可以推荐以下实现
- laminas-servicemanager:
composer require laminas/laminas-servicemanager
- Pimple(有关更多详细信息,请参阅文档):
composer require laminas/laminas-pimple-config
- Aura.Di(有关更多详细信息,请参阅文档):
composer require laminas/laminas-auradi-config
此外,您可能还想安装模板渲染器实现和/或错误处理集成。这些在文档中有所说明。
文档
mkdocs build
此外,面向公众的浏览式文档可在以下网址找到:https://docs.mezzio.dev/mezzio/