rosstuck / prosaic
Yet another boring PSR-15 middleware dispatcher
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 2
Open Issues: 0
pkg:composer/rosstuck/prosaic
Requires
- php: >=7.4
- psr/http-message: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- doctrine/coding-standard: ^8.1
- laminas/laminas-diactoros: ^2.3
- phpstan/phpstan: ^0.12.33
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2025-09-09 07:51:26 UTC
README
A boring PSR-15 Middleware dispatcher
Prosaic can run your incoming PSR-7 requests through a pipeline of PSR-15 middleware. There's no fancy builder methods, routing or DI container integration, it's really just a pipeline of middleware. That's it.
Installation
composer require rosstuck/prosaic
Example
You can set up your middleware pipeline like so:
<?php $dispatcher = new Prosaic\HttpDispatcher( new FirstMiddleware(), new SecondMiddleware(), new ThirdMiddleware() ); $response = $dispatcher->dispatch($request);
Testing
composer test