Duon core web framework
- PHP 99.9%
|
Thomas Ernst
9535b3684f
All checks were successful
ci / ci (push) Successful in 1m23s
|
||
|---|---|---|
| .forgejo/workflows | Allow manual CI runs | |
| .github | Add GitHub mirror README | |
| docs | Add error handler | |
| src | Improve dev server error output | |
| tests | Improve dev server error output | |
| .editorconfig | Sync shared config files | |
| .gitattributes | Update .gitattributes | |
| .gitignore | Update .gitignore | |
| CHANGELOG.md | Release v0.4.0 | |
| composer.json | Add error handler | |
| LICENSE.md | Update license | |
| mago.toml | Update mago settings | |
| phpunit.xml.dist | Update coverage config | |
| psalm.xml.dist | Rename config files from *.dist.xml to *.xml.dist | |
| README.md | Add error handler | |
Celemas Core Framework
ci code coverage type coverage psalm level Software License
Celemas Core is a lightweight and easily extendable >=PHP 8.3 web framework.
[!WARNING] This library is under active development, some of its features are still experimental and subject to change. Large parts of the documentation are missing.
It features:
- Http Routing.
- An autowiring container used for automatic dependency injection.
- Middleware.
- Error handling for PSR-15 request pipelines.
- Convenience wrappers for PSR request, response and middleware.
- Logging.
Routing
App exposes the router's common route helpers and runs requests through the router RoutingHandler internally.
use Celemas\Core\App;
use Celemas\Router\Group;
$app = App::create();
$app->get('/health', [HealthController::class, 'show'], 'health');
$app->map(['GET', 'POST'], '/login', [AuthController::class, 'login'], 'login');
$app->any('/webhook', $webhook, 'webhook');
$app->group('/admin', function (Group $admin) use ($auth): void {
$admin->middleware($auth);
$admin->controller(AdminController::class);
$admin->get('', 'index', 'admin.index');
$admin->post('/login', 'login', 'admin.login');
});
Supported PSRs:
- PSR-3 Logger Interface
- PSR-4 Autoloading
- PSR-7 Http Messages (Request, Response, Stream, and so on.)
- PSR-11 Container Interface
- PSR-12 Extended Coding Style
- PSR-15 Http Middleware
- PSR-17 Http Factories
License
This project is licensed under the MIT license.