stack/callable-http-kernel

HttpKernelInterface implementation based on callables.

Installs: 38 364

Dependents: 23

Suggesters: 0

Security: 0

Stars: 24

Watchers: 6

Forks: 11

Open Issues: 4

pkg:composer/stack/callable-http-kernel

v1.0.1 2016-06-18 18:53 UTC

This package is not auto-updated.

Last update: 2025-10-18 18:17:37 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!');
});