memran / marwa-framework
MarwaPHP - A future‑proof, PSR‑compliant PHP framework core.Minimal, modular, and fast — with developer‑friendly APIs.
v1.2.0
2026-04-09 11:51 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9
- league/container: ^5.1
- league/flysystem: ^3.29
- league/flysystem-local: ^3.29
- matthiasmullie/scrapbook: ^1.5
- memran/marwa-db: ^1.2
- memran/marwa-debugbar: ^1.0
- memran/marwa-entity: ^1.0
- memran/marwa-error-handler: ^1.1
- memran/marwa-event: ^0.2
- memran/marwa-logger: ^1.0
- memran/marwa-module: ^1.0.1
- memran/marwa-router: ^1.3
- memran/marwa-support: ^1.2
- memran/marwa-view: ^1.0
- nesbot/carbon: ^3.10
- psr/event-dispatcher: ^1.0
- relay/relay: ^3.0
- symfony/console: ^7.3
- symfony/dotenv: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.89
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
Suggests
- memran/marwa-db: Optional database toolkit integration; console commands auto-register when available.
- memran/marwa-entity: Optional entity builder and validation layer for domain models.
- memran/marwa-kafka: Optional Kafka publisher/consumer for notification fan-out and async message processing.
- memran/marwa-module: Optional module management for modular application structure.
- memran/marwa-support: Optional support helpers and utility primitives for consuming apps.
- psy/psysh: Optional interactive console shell for tinker-style debugging.
- swiftmailer/swiftmailer: Optional SwiftMailer-compatible transport for the Mailer service.
README
Marwa Framework is a lightweight, PSR-aligned PHP 8.2+ framework core for modular web apps, console tools, and reusable runtime services.
What It Includes
- HTTP kernel, middleware pipeline, router integration, and lifecycle events
- Twig-based views with themes, modules, and base controller helpers
- Console application, scaffolding commands, scheduler, queue, and bootstrap cache
- Sessions, validation, security, cache, storage, mail, notifications, Kafka publish/consume, HTTP client, and error handling
marwa-dbandmarwa-moduleintegration for app-level runtime features
Install
composer require memran/marwa-framework
For local development:
git clone https://github.com/memran/marwa-framework.git
cd marwa-framework
composer install
cp .env.example .env
Quick Start
use Marwa\Framework\Application; $app = new Application(__DIR__); $app->boot(); $response = $app->http()->handle($request);
php bin/console make:controller Admin/PostController --resource php bin/console make:seeder UserSeeder php bin/console make:model Billing/Invoice --migration php bin/console make:module Blog php bin/console make:theme dark --parent=default php bin/console shell php bin/console security:report --since-hours=24 --prune-days=30 php bin/console db:seed --class=DatabaseSeeder php bin/console schedule:run --for=60 --sleep=1
Documentation
- Docs Index
- Quick Start
- Controllers
- Validation
- View
- Error Pages
- Console
- Seeding
- DebugBar
- Architecture
Notes
- Generated controllers extend
Marwa\Framework\Controllers\Controller. - Validation failures flash
_old_inputanderrorsinto the session. - Theme manifests live in
resources/views/themes/<theme>/manifest.phpby default. APP_KEYis required for encrypted sessions.
Development
composer test
composer analyse
composer lint