The HTTP component for the Sauber PHP framework

Fund package maintenance!

dev-main 2022-05-30 10:11 UTC

This package is not auto-updated.

Last update: 2024-06-08 21:40:31 UTC



Http Component

GitHub release (latest by date) Tests Static Analysis Total Downloads GitHub

This is the repository for the HTTP Component used in the Sauber PHP Framework.


You should not need to install this package, as it comes pre-installed with the Sauber PHP Framework, however if you want to use this outside of the framework please use composer:

composer require sauber-php/http


To use the component, you can instantiate with your own container and add routes:

$router = new Router(
    container: new Container(),

    middleware: new PSR15Middleware(),

    path: '/',
    handler: fn () => ['test' => time()],

    request: Request::capture(),


To run the tests:


Static Analysis

To check the static analysis:

./vendor/bin/phpstan analyse


Please see the Changelog for more information on what has changed recently.