Search by

ziraphp / framework

Subu-07

ZiraPHP: a minimal, PSR-first PHP framework core.

Package info

github.com/Subu-07/ZiraPHP

pkg:composer/ziraphp/framework

Statistics

Installs: 48

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-12-03 17:16 UTC

This package is auto-updated.

Last update: 2026-12-03 17:30:55 UTC


README

A small, PSR-first PHP framework core. ZiraPHP gives you a service container, router, middleware pipeline, event dispatcher and application bootstrap, all built on PHP-FIG standards, so any PSR-compatible library plugs straight in.

Status: 0.x. Anything can change between minor versions until 1.0. See docs/roadmap.md.

Requirements

  • PHP 8.2 or newer (8.3+ is the long-term target)
  • Composer 2

Install

composer require ziraphp/framework

Hello world

<?php

declare(strict_types=1);

use ZiraPHP\Core\Application;

require __DIR__ . '/../vendor/autoload.php';

$app = new Application(dirname(__DIR__));
$router = $app->getRouter();

$router->get('/', fn (): string => '<h1>Hello from ZiraPHP</h1>');
$router->get('/hello/{name}', fn (string $name): array => ['message' => "Hello, {$name}!"]);

$app->run();

Strings become HTML responses, arrays become JSON, and null becomes 204 No Content. Handlers can also return any PSR-7 response.

Try the bundled example:

composer install
php -S localhost:8080 -t examples/hello-world/public

What is inside

Area Standard Class
Service container (autowiring, attributes) PSR-11 ZiraPHP\Core\Container\Container
HTTP messages PSR-7 / PSR-17 nyholm/psr7
Middleware pipeline PSR-15 ZiraPHP\Core\Http\MiddlewarePipeline
Router — ZiraPHP\Core\Routing\Router
Events PSR-14 ZiraPHP\Core\Events\EventDispatcher
Application bootstrap PSR-15 handler ZiraPHP\Core\Application
Generic data store contract — ZiraPHP\Interfaces\Persistence\DataStoreInterface

Documentation

Quality gates

composer check   # code style, PHPStan level 9, Psalm level 1, PHPUnit

License

MIT. See LICENSE.