GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 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.

BranchesTags
Open more actions menu

Latest commit

 

History

509 Commits
509 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
doc
doc
 
 
resources
resources
 
 
src
src
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.php-cs-fixer.php
.php-cs-fixer.php
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
infection.json
infection.json
 
 
phpstan.neon
phpstan.neon
 
 
phpunit.xml
phpunit.xml
 
 
sonar-project.properties
sonar-project.properties
 
 

Repository files navigation

chubbyphp-framework

CI Coverage Status Mutation testing badge Latest Stable Version Total Downloads Monthly Downloads

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

Description

A minimal, highly performant middleware microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use. It is built on PSR-7 (HTTP message), PSR-15 (handlers / middleware) and PSR-17 (HTTP factories), with optional PSR-11 container and PSR-3 logger integration.

Workflow

Requirements

  • php: ^8.3
  • chubbyphp/chubbyphp-http-exception: ^1.3.5
  • 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.5
  • chubbyphp/chubbyphp-framework-router-symfony: ^2.3.5

PSR 7 / PSR 17

  • guzzlehttp/psr7: ^2.13.2 (with http-interop/http-factory-guzzle: ^1.2.1)
  • laminas/laminas-diactoros: ^3.9
  • nyholm/psr7: ^1.8.2
  • slim/psr7: ^1.8
  • sunrise/http-message: ^3.8.0

Installation

Through Composer as chubbyphp/chubbyphp-framework.

composer require chubbyphp/chubbyphp-framework "^6.1" \
    chubbyphp/chubbyphp-framework-router-fastroute "^2.3.5" \
    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()));

Or with the ApplicationBuilder facade, which wires the very same middleware pipe:

<?php

declare(strict_types=1);

namespace App;

use Chubbyphp\Framework\Facade\ApplicationBuilder;
use Chubbyphp\Framework\RequestHandler\CallbackRequestHandler;
use Chubbyphp\Framework\Router\FastRoute\RouteMatcher;
use Chubbyphp\Framework\Router\RoutesByNameInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Psr7\Factory\ResponseFactory;
use Slim\Psr7\Factory\ServerRequestFactory;

require __DIR__.'/vendor/autoload.php';

$responseFactory = new ResponseFactory();
$createRouteMatcher = static fn (RoutesByNameInterface $routes) => new RouteMatcher($routes);

$app = ApplicationBuilder::create($responseFactory, $createRouteMatcher, debug: true)
    ->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;
        }
    ))
    ->build();

$app->emit($app->handle((new ServerRequestFactory())->createFromGlobals()));

Emitter

  • Emitter

Facade

  • AbstractCollector
  • ApplicationBuilder
  • GroupCollector

Middleware

  • CallbackMiddleware
  • ExceptionMiddleware
  • LazyMiddleware
  • PipeMiddleware
  • RouteMatcherMiddleware
  • SlimCallbackMiddleware
  • SlimLazyMiddleware
  • UrlGeneratorMiddleware

RequestHandler

  • CallbackRequestHandler
  • LazyRequestHandler
  • RouteRequestHandler
  • SlimCallbackRequestHandler
  • SlimLazyRequestHandler

Router

  • Group
  • Route

Server

  • Builtin (development only)
  • Nginx
  • Swoole
  • Workerman

Skeleton

  • chubbyphp/chubbyphp-framework-skeleton
  • chubbyphp/petstore

Migration

  • 5.x to 6.x
  • 4.x to 5.x
  • 3.x to 4.x
  • 2.x to 3.x
  • 1.x to 2.x
  • Slim to Chubbyphp

Copyright

2026 Dominik Zogg

About

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.

Topics

apichubbyphpchubbyphp-frameworkframeworkmicro-frameworkmicroframeworkmiddlewarephp-micro-frameworkpsr-11psr-15psr-17psr-7

Resources

Readme
MIT license
Activity
Custom properties

Stars

136 stars

Watchers

4 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.