conia / chuck
This package is abandoned and no longer maintained.
The author suggests using the conia/core package instead.
A lightweight PHP framework
dev-main
2024-01-20 13:53 UTC
Requires
- php: >=8.1
- conia/cli: dev-main
- laminas/laminas-httphandlerrunner: ^2.4
- psr/container: ^2.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0
- psr/http-message-implementation: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^1
- filp/whoops: ^2.15
- guzzlehttp/psr7: ^2
- laminas/laminas-diactoros: ^2
- league/container: ^4
- nyholm/psr7: ^1.8
- nyholm/psr7-server: ^1
- pestphp/pest: ^1
- phpbench/phpbench: ^1.2
- phpunit/phpunit: ^9
- vimeo/psalm: ^5.7
README
Caution
This project has been archived. You may want to check out https://github.com/coniadev/core instead.
Chuck is a lightweight and easily extendable PHP 8.1 web framework.
Warning: This framework is under active development and some of the listed features are still experimental and subject to change. The information here might become outdated and misleading.
It features:
- Routing
- An autowiring container
- Custom and PSR-15 middleware
- Logging (PHP builtin logging or PSR-3 support)
Supported PSRs:
- PSR-3 Logger Interface
- PSR-4 Autoloading
- PSR-7 Http Messages (Request, Response, Stream)
- PSR-11 Container Interface
- PSR-12 Extended Coding Style
- PSR-15 Http Middleware
Usage:
Installation:
composer require nyholm/psr7 nyholm/psr7-server conia/chuck
Quick Start using the App::create
helper:
use Conia\Chuck\{App, Config, Request}; $app = App::create(new Config('chuck')); $app->route('/', '\Namespace\Controller::index'); $app->get('/user/{name}', (string $name) => "Hello, $name")); $app->post('/users', function (Request $request, Response $response): Response { Users::create($request->json()); return $response->json(['success' => true]); }); $app->run();
License
Chuck is released under the MIT license.
Copyright © 2022-2023 ebene fünf GmbH. All rights reserved.