chubbyphp / chubbyphp-framework
A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
6.0.2
2026-01-16 20:36 UTC
Requires
- php: ^8.3
- chubbyphp/chubbyphp-http-exception: ^1.3.2
- psr/container: ^1.1.2|^2.0.2
- psr/http-factory: ^1.1
- psr/http-factory-implementation: ^1.0
- psr/http-message: ^1.1|^2.0
- psr/http-message-implementation: ^1.0|^2.0
- psr/http-server-handler: ^1.0.2
- psr/http-server-middleware: ^1.0.2
- psr/log: ^2.0|^3.0.2
Requires (Dev)
- chubbyphp/chubbyphp-dev-helper: dev-master
- chubbyphp/chubbyphp-mock: ^2.1.2
- guzzlehttp/psr7: ^2.8
- http-interop/http-factory-guzzle: ^1.2.1
- infection/infection: ^0.32.3
- laminas/laminas-diactoros: ^3.8
- nyholm/psr7: ^1.8.2
- php-coveralls/php-coveralls: ^2.9.1
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.1.33
- phpunit/phpunit: ^12.5.6
- slim/psr7: ^1.8
- sunrise/http-message: ^3.7
- dev-master / 6.0.x-dev
- 6.0.2
- 6.0.1
- 6.0.0
- 5.3.0
- 5.2.0
- 5.1.1
- 5.1.0
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- v4.x-dev
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.0
- v3.x-dev
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.1
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- v2.x-dev
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.0
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.2-beta1
- 2.1.0
- 2.0.0
- 2.0-beta2
- 2.0-beta1
- v1.x-dev
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- 1.0-beta3
- 1.0-beta2
- 1.0-beta1
- 1.0-alpha9
- 1.0-alpha8
- 1.0-alpha7
- 1.0-alpha6
- 1.0-alpha5
- 1.0-alpha4
- 1.0-alpha3
- 1.0-alpha2
- 1.0-alpha1
This package is auto-updated.
Last update: 2026-03-11 20:23:35 UTC
README
Description
A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
- Basic Coding Standard (1)
- Coding Style Guide (2)
- Logger Interface (3)
- Autoloading Standard (4)
- HTTP Message Interface (7)
- Container Interface (11)
- HTTP Handlers (15)
- HTTP Factories (17)
Requirements
- php: ^8.3
- chubbyphp/chubbyphp-http-exception: ^1.3.2
- psr/container: ^1.1.2|^2.0.2
- psr/http-factory-implementation: ^1.0
- psr/http-factory: ^1.1
- psr/http-message-implementation: ^1.0|^2.0
- psr/http-message: ^1.1|^2.0
- psr/http-server-handler: ^1.0.2
- psr/http-server-middleware: ^1.0.2
- psr/log: ^2.0|^3.0.2
Suggest
Router
Any Router which implements Chubbyphp\Framework\Router\RouteMatcherInterface can be used.
- chubbyphp/chubbyphp-framework-router-fastroute: ^2.3.3
- chubbyphp/chubbyphp-framework-router-symfony: ^2.3.3
PSR 7 / PSR 17
- guzzlehttp/psr7: ^2.8 (with http-interop/http-factory-guzzle: ^1.2.1)
- laminas/laminas-diactoros: ^3.8
- nyholm/psr7: ^1.8.2
- slim/psr7: ^1.8
- sunrise/http-message: ^3.7
Installation
Through Composer as chubbyphp/chubbyphp-framework.
composer require chubbyphp/chubbyphp-framework "^6.0.2" \
chubbyphp/chubbyphp-framework-router-fastroute "^2.3.3" \
slim/psr7 "^1.8"
Usage
<?php
declare(strict_types=1);
namespace App;
use Chubbyphp\Framework\Application;
use Chubbyphp\Framework\Middleware\ExceptionMiddleware;
use Chubbyphp\Framework\Middleware\RouteMatcherMiddleware;
use Chubbyphp\Framework\RequestHandler\CallbackRequestHandler;
use Chubbyphp\Framework\Router\FastRoute\RouteMatcher;
use Chubbyphp\Framework\Router\Route;
use Chubbyphp\Framework\Router\RoutesByName;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Psr7\Factory\ResponseFactory;
use Slim\Psr7\Factory\ServerRequestFactory;
require __DIR__.'/vendor/autoload.php';
$responseFactory = new ResponseFactory();
$app = new Application([
new ExceptionMiddleware($responseFactory, true),
new RouteMatcherMiddleware(new RouteMatcher(new RoutesByName([
Route::get('/hello/{name:[a-z]+}', 'hello', new CallbackRequestHandler(
static function (ServerRequestInterface $request) use ($responseFactory) {
$response = $responseFactory->createResponse();
$response->getBody()->write(sprintf('Hello, %s', $request->getAttribute('name')));
return $response;
}
))
]))),
]);
$app->emit($app->handle((new ServerRequestFactory())->createFromGlobals()));
Emitter
Middleware
- CallbackMiddleware
- ExceptionMiddleware
- LazyMiddleware
- PipeMiddleware
- RouteMatcherMiddleware
- SlimCallbackMiddleware
- SlimLazyMiddleware
RequestHandler
- CallbackRequestHandler
- LazyRequestHandler
- RouteRequestHandler
- SlimCallbackRequestHandler
- SlimLazyRequestHandler
Router
Server
Skeleton
Migration
Copyright
2026 Dominik Zogg