Skip to content

PHP MVC

CI Latest Version PHP Version License

Lightweight PHP 8.4+ MVC framework. Provides a PSR-7/PSR-15 web layer, a CLI scaffolding tool, and optional modules for database migrations, background tasks, and authentication.

Features

  • PSR-7 / PSR-15 — bring your own HTTP foundation; the framework adapts to your stack.
  • Typed routing — path parameters coerced to int, float, string, or validated UUID.
  • Auto-escaped views{{var}} is HTML-escaped by default; raw HTML requires {{{var}}}.
  • CSRF protection — token validated from form body or X-CSRF-Token header.
  • Cookie-based auth — sign-up, sign-in, password reset, and session refresh use cases included.
  • Database migrations — timestamped SQL folders with forward/rollback scripts and schema comparison.
  • Background tasks — SQL-backed task queue with cron or in-process worker modes.
  • Asset bundling — merge and minify JS/CSS with a single CLI command.
  • PHPStan max — strictly typed throughout.

Installation

composer require aseguragonzalez/php-mvc

Requires PHP 8.4 and Composer.

Where to start

License

MIT License. Copyright (c) 2026 Alfonso Segura.