ez-php / framework
Lightweight PHP framework core — dependency injection, routing, middleware, and database migrations
0.2.0
2026-03-15 03:47 UTC
Requires
- php: ^8.5
- ext-pdo: *
- ez-php/console: 0.*
- ez-php/dotenv: 0.*
- ez-php/http: 0.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^13.0
README
Lightweight PHP framework core — dependency injection, routing, middleware, and database migrations.
Requirements
- PHP 8.5+
- ext-pdo
Installation
composer require ez-php/framework
What's included
| Module | Description |
|---|---|
Application |
Runtime kernel, bootstrap lifecycle, service provider loading |
Container |
Dependency injection with autowiring |
ServiceProvider |
Register/boot pattern for modular configuration |
Http |
Immutable Request / Response, RequestFactory |
Routing |
Router with named routes, route groups, and URL parameter support |
Middleware |
Pipeline-based middleware with terminable support |
Database |
Thin PDO wrapper with transactions |
Migration |
File-based migration runner with batch rollback |
Config |
Dot-notation config loader |
Console |
CLI kernel with command registration |
Env |
.env file parser with variable interpolation |
Exceptions |
Exception handler with service provider integration |
Quick start
$app = new \EzPhp\Application\Application(basePath: __DIR__); $app->register(AppServiceProvider::class); $app->bootstrap(); $response = $app->handle(\EzPhp\Http\RequestFactory::fromGlobals()); (new \EzPhp\Http\ResponseEmitter())->emit($response);
Optional modules
- ez-php/orm — Active Record ORM with query builder and schema builder
- ez-php/auth — Authentication
- ez-php/cache — Cache drivers (array, file, Redis)
- ez-php/events — Event dispatcher
- ez-php/i18n — Internationalisation
- ez-php/validation — Validator
- ez-php/http-client — HTTP client
License
MIT — Andreas Uretschnig