PHPackages                             asgrim/mini-mezzio - 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. [Framework](/categories/framework)
4. /
5. asgrim/mini-mezzio

ActiveLibrary[Framework](/categories/framework)

asgrim/mini-mezzio
==================

Minimal Application Factory for Mezzio

2.3.0(1mo ago)251891[2 issues](https://github.com/asgrim/mini-mezzio/issues)[1 PRs](https://github.com/asgrim/mini-mezzio/pulls)MITPHPPHP 8.4.\*|8.5.\*

Since Jun 18Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/asgrim/mini-mezzio)[ Packagist](https://packagist.org/packages/asgrim/mini-mezzio)[ RSS](/packages/asgrim-mini-mezzio/feed)WikiDiscussions 2.4.x Synced today

READMEChangelog (8)Dependencies (23)Versions (17)Used By (0)

Mini Mezzio
===========

[](#mini-mezzio)

Make setting up a Mezzio application even quicker by using this package. This makes an assumption that you are happy to use:

- `laminas/diactoros` for the application's PSR-7 server request implementation
- You do not need to use the `SapiStreamEmitter`
- Your `ServerRequest` comes from `$_SERVER`

All you need to provide is:

- A container instance implementing `ContainerInterface`, for example [laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/)
- A router instance implementing `RouterInterface`, for example [FastRoute](https://docs.mezzio.dev/mezzio/v3/features/router/fast-route/)

You would then pipe the `RouteMiddleware`, `DispatchMiddleware`, and any other middleware or request handlers that your application needs.

Basic Usage: Example Application using Mini Mezzio
--------------------------------------------------

[](#basic-usage-example-application-using-mini-mezzio)

First you must require Mini Mezzio, a container, and a router with Composer. In this example, we'll use Laminas ServiceManager and FastRoute.

```
$ composer require asgrim/mini-mezzio laminas/laminas-servicemanager mezzio/mezzio-fastroute
```

Then in `public/index.php` we can create our application:

```
