mezzio
PSR-15 Middleware in Minutes
Features

PSR-15 Middleware
Create middleware applications, using as many layers as you want, and the architecture your project needs.

Dependency Injection
Make your code flexible and robust, using the dependency injection container of your choice.
Get Started Now!
Installation is only a Composer command away!
$ composer create-project mezzio/mezzio-skeleton mezzio
Mezzio provides interfaces for routing and templating, letting you choose what to use, and how you want to implement it.
Our unique installer allows you to select your choices when starting your project!
Applications, Simplified
Write middleware:
$pathMiddleware = function (
ServerRequestInterface $request,
RequestHandlerInterface $handler
) {
$uri = $request->getUri();
$path = $uri->getPath();
return new TextResponse('You visited ' . $path, 200, ['X-Path' => $path]);
};
And add it to an application:
$app->get('/path', $pathMiddleware);
Learn more
Or use the sidebar menu to navigate to the section you're interested in.
Support
- Issues: github.com/mezzio/mezzio/issues
- Source: github.com/mezzio/mezzio
- Chat: laminas.dev/chat
- Forum: discourse.laminas.dev