• PHP 8.2+
  • MIT
  • MVC
  • CLI
  • ORM
  • AOP

Azera Framework

A fast and lightweight PHP framework for building modern web applications and CLI tools. Azera combines the best ideas from Phalcon, CodeIgniter, Laravel and Symfony into a minimal yet powerful toolkit.

Why Azera

Lightweight by design, powerful in practice

MVC Stack

Fast pattern-matching router with named routes, parameter validation and middleware. Action-based controllers with dependency injection and a flexible dispatcher pipeline.

Database & ORM

Unified fluent query builder for SELECT, INSERT, UPDATE, DELETE plus Active Record models with state tracking. Prepared statements everywhere and built-in read/write splitting.

Clarity Templates

The Clarity template engine ships out of the box: auto-escaping, template inheritance, filter pipeline, and a native PHP engine for maximum performance.

CLI Toolkit

Auto-discover tasks from PSR-4 namespaces, parse options automatically, render styled help pages. A built-in model:sync task keeps models aligned with your schema.

Secure by Default

Prepared statements throughout, CSRF tokens, password hashing, authenticated encryption (libsodium or OpenSSL) and a structured exception hierarchy.

Lightweight Runtime

Minimal mandatory dependencies, modern PHP 8.2+ patterns (typed properties, named arguments, readonly models) and service composition through AppContext.

Quick start

Up and running in minutes

For a working project, start from the Azera App skeleton, install its dependencies, and run the built-in development server. Add your routes in the BootstrapProvider; the skeleton already includes the entry point and a starter controller.

  • Runnable project with Composer autoloading
  • Centralized setup and route registration in BootstrapProvider
  • Controller actions with route parameters and dependency injection
  • Local server started with composer serve
Read the getting-started guide
composer create-project sailantis/azera-app my-app
cd my-app
composer serve
private function registerRoutes(Router $router): void
{
    $router->controller(Controllers\IndexController::class, function (Router $r): void {
        $r->get('/', '::indexAction');
        $r->get('/about', '::aboutAction');
    });
}

Measured, not claimed

Benchmark results

The same seven applications, the same seeded database and the same page size. Each route is drawn twice — once on a resident worker that boots the framework once, and once on nginx + PHP-FPM, which builds it again for every request — because those two numbers differ by far more than the frameworks differ from each other. Within each chart every row is relative to Azera.

The landing page, rendered by a template, with no database access.

Volucer Resident worker

Volucer, resident worker deployment, serving GET /. Median response time, fastest first: Azera 0.19 ms, Phalcon 6 (RC) 0.20 ms, Symfony 0.27 ms, CakePHP 0.29 ms, Laravel 0.36 ms, Spiral 0.59 ms, CodeIgniter 0.62 ms. Each framework at its measured median, lowest 0.19, highest 0.62 milliseconds.

The framework boots once, then every request is served from that built state.

nginx + PHP-FPM Per request

nginx + PHP-FPM, per request deployment, serving GET /. Median response time, fastest first: Azera 0.37 ms, Phalcon 6 (RC) 0.66 ms, CakePHP 1.34 ms, CodeIgniter 1.70 ms, Symfony 2.03 ms, Laravel 3.80 ms, Spiral 8.10 ms. Each framework at its measured median, lowest 0.37, highest 8.10 milliseconds.

The framework builds itself again for every request.

The ORM API request without row hydration: rows fetched as plain data, serialized as JSON.

Volucer Resident worker

Volucer, resident worker deployment, serving GET /api/items-fast. Median response time, fastest first: Azera 0.22 ms, Phalcon 6 (RC) 0.33 ms, CakePHP 0.47 ms, Symfony 0.49 ms, Laravel 0.64 ms, Spiral 0.68 ms, CodeIgniter 0.80 ms. Each framework at its measured median, lowest 0.22, highest 0.80 milliseconds.

The framework boots once, then every request is served from that built state.

nginx + PHP-FPM Per request

nginx + PHP-FPM, per request deployment, serving GET /api/items-fast. Median response time, fastest first: Azera 0.86 ms, Phalcon 6 (RC) 1.54 ms, CodeIgniter 2.21 ms, CakePHP 2.31 ms, Symfony 2.52 ms, Laravel 4.68 ms, Spiral 7.88 ms. Each framework at its measured median, lowest 0.86, highest 7.88 milliseconds.

The framework builds itself again for every request.

The ORM page without row hydration: rows fetched as plain data, rendered by a template.

Volucer Resident worker

Volucer, resident worker deployment, serving GET /items-fast. Median response time, fastest first: Azera 0.28 ms, Phalcon 6 (RC) 0.56 ms, CakePHP 0.73 ms, Laravel 0.76 ms, Symfony 0.80 ms, Spiral 0.87 ms, CodeIgniter 0.96 ms. Each framework at its measured median, lowest 0.28, highest 0.96 milliseconds.

The framework boots once, then every request is served from that built state.

nginx + PHP-FPM Per request

nginx + PHP-FPM, per request deployment, serving GET /items-fast. Median response time, fastest first: Azera 1.03 ms, Phalcon 6 (RC) 1.80 ms, CodeIgniter 2.41 ms, CakePHP 2.62 ms, Symfony 3.15 ms, Laravel 4.96 ms, Spiral 8.70 ms. Each framework at its measured median, lowest 1.03, highest 8.70 milliseconds.

The framework builds itself again for every request.

Median of 1000 iterations per run over 10 runs, end to end over HTTP on loopback. PHP 8.5.11 · JIT: tracing (buffer 64M). Served by Volucer 0.6.0 · nginx 1.24.0 + PHP-FPM 8.5.11.

Install

Add it to an existing project

Requires PHP 8.2+ with the pdo and mbstring extensions. For encrypted cookies, enable sodium (recommended) or openssl. After installing, follow the guide to wire up your bootstrap and entry point.

composer require sailantis/azera-framework

Continue with the Getting Started guide.