rstgroup / diagnostics-middleware
ZendDiagnostics PSR-7 middleware
Installs: 2 115
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 7
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
- http-interop/http-middleware: ^0.4.1
- php-middleware/double-pass-compatibility: ^1.0
- psr/container: ^1.0
- psr/http-message: ^1.0
- zendframework/zend-diactoros: ^1.1
- zendframework/zenddiagnostics: ^1.1
Requires (Dev)
- phpunit/phpunit: ^5.7.26 || ^6.0
This package is not auto-updated.
Last update: 2024-09-28 19:31:09 UTC
README
ZendDiagnostics PSR-7 middleware
Usage
Create your middleware and add it to middleware stack:
$runner = new ZendDiagnostics\Runner\Runner(); // add checks to your diagnostics runner // Create response output factory $factory = new RstGroup\DiagnosticsMiddleware\ResultResponseFactory\JsonResultResponseFactory(); // Create middleware $middleware = new RstGroup\DiagnosticsMiddleware\DiagnosticsMiddleware(); // add to your middeware runner $app = new MiddlewareRunner(); $app->add($middleware); $app->run();
We provide factories (using container-interop
) and config
provider, so implementation should be easy withzend-expressive
or other PSR-7 middleware framework.
Installation
Add project name (rstgroup/diagnostics-middleware
) to composer.json.