Description
A based PSR-15 microframework that also sets maximum flexibility with minimum complexity and easy replaceability of the individual components, but also of the framework. Although performance was not a focus, it's currently the fastest PSR-15 based framework (php-fpm) on the market.
chubbyphp-framework alternatives and similar libraries
Based on the "API" category.
Alternatively, view chubbyphp-framework alternatives based on common mentions on social networks and blogs.
-
API Platform
πΈοΈ Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time. -
Restler
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and/or RESTful API -
wsdl2phpgenerator
DISCONTINUED. Simple utility and class library for generating php classes from a wsdl file. -
OverblogGraphQLBundle
This bundle provides tools to build a complete GraphQL API server in your Symfony App. -
Pinterest Bot for PHP
DISCONTINUED. This PHP library will help you to work with your Pinterest account without using any API account credentials. -
Slack for PHP
A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax. -
Drest
Quickly and easily expose Doctrine entities as REST resource endpoints with the use of simple configuration with annotations, yaml, json or a PHP array. -
cidaas SDK for php
With this SDK, you can integrate cidaas smoothly and with minimal effort into your PHP application. It enables you to map the most important user flows for OAuth2 and OIDC compliant authentication. Secure β Fast β And unrivaled Swabian. -
yii2-fractal
A set of utils and actions for build API following JSON:Api specification, based on league/fractal -
icanhazstring/expressive-hashids-middleware
PSR-15/PSR-7 compliant middleware using ivanakimov/hashids.php
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of chubbyphp-framework or a related project?
README
chubbyphp-framework
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)
[Application workflow](doc/Resources/workflow.png?raw=true "Application workflow")
Requirements
- php: 7.4|8.0
- psr/container: 1.0|2.0
- psr/http-factory: 1.0.1
- psr/http-message-implementation: 1.0
- psr/http-message: 1.0.1
- psr/http-server-handler: 1.0.1
- psr/http-server-middleware: 1.0.1
- psr/log: 1.1
Suggest
Router
Any Router which implements Chubbyphp\Framework\Router\RouteMatcherInterface
can be used.
PSR 7 / PSR 17
- bittyphp/http: 2.0
- guzzlehttp/psr7: 1.4.2 (with http-interop/http-factory-guzzle: 1.0)
- nyholm/psr7: 1.0
- slim/psr7: 0.5|1.0
- sunrise/http-message: 1.0 (with sunrise/http-factory: 1.0)
- laminas/laminas-diactoros: 2.0
Installation
Through Composer as chubbyphp/chubbyphp-framework.
composer require chubbyphp/chubbyphp-framework "^3.5" \
chubbyphp/chubbyphp-framework-router-fastroute "^1.2" \
slim/psr7 "^1.4"
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\Routes;
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 Routes([
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;
}
))
])), $responseFactory),
]);
$app->emit($app->handle((new ServerRequestFactory())->createFromGlobals()));
Emitter
- [Emitter][65]
Middleware
- [CallbackMiddleware][70]
- [ExceptionMiddleware][71]
- [LazyMiddleware][72]
- [MiddlewareDispatcher][73]
- [NewRelicRouteMiddleware][74]
- [RouteMatcherMiddleware][75]
- [SlimCallbackMiddleware][76]
- [SlimLazyMiddleware][77]
RequestHandler
- [CallbackRequestHandler][80]
- [LazyRequestHandler][81]
- [RouteRequestHandler][82]
- [SlimCallbackRequestHandler][83]
- [SlimLazyRequestHandler][84]
Router
- [Group][90]
- [Route][91]
Server
Skeleton
Migration
- [3.x to 4.x][212]
- [2.x to 3.x][211]
- [1.x to 2.x][210]
- [Slim to Chubbyphp][219]
Copyright
Dominik Zogg 2021