The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
Mezzio: PSR-7 Middleware in Minutes
- Routing. Choose your own router; we support:
- DI Containers, via PSR-11 Container. All middleware composed in Mezzio may be retrieved from the composed container.
- Optionally, templating. We support:
- Laminas's PhpRenderer
- Error handling. Create templated error pages, or use tools like whoops for debugging purposes.
- Nested middleware applications. Write an application, and compose it later in another, optionally under a separate subpath.
- Simplified installation. Our custom Composer-based installer prompts you for your initial stack choices, giving you exactly the base you want to start from.
Essentially, Mezzio allows you to develop using the tools you prefer, and provides minimal structure and facilities to ease your development.
Should I choose it over Laminas\Mvc? That’s a good question. Here’s what we recommend.
If you’re keen to get started, then keep reading and get started writing your first middleware application today!
Found a mistake or want to contribute to the documentation? Edit this page on GitHub!