stack / callable-http-kernel
HttpKernelInterface implementation based on callables.
Installs: 35 474
Dependents: 23
Suggesters: 0
Security: 0
Stars: 24
Watchers: 7
Forks: 11
Open Issues: 4
Requires
- php: >=5.3.0
- symfony/http-foundation: ~2.1|~3.0
- symfony/http-kernel: ~2.1|~3.0
Requires (Dev)
- phpunit/phpunit: ^5.2
This package is not auto-updated.
Last update: 2024-11-16 14:01:38 UTC
README
HttpKernelInterface implementation based on callables.
It's mostly useful to test stack middlewares, and to mock the HttpKernelInterface on the fly.
Example
use Stack\CallableHttpKernel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app = new CallableHttpKernel(function (Request $request) {
return new Response('Hello World!');
});