PHPackages                             aseguragonzalez/php-mvc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. aseguragonzalez/php-mvc

ActiveLibrary[Framework](/categories/framework)

aseguragonzalez/php-mvc
=======================

Lightweight PHP MVC Framework

v0.1.1(1w ago)06↓100%MITPHPPHP ^8.4CI passing

Since May 28Pushed 1w agoCompare

[ Source](https://github.com/aseguragonzalez/php-mvc)[ Packagist](https://packagist.org/packages/aseguragonzalez/php-mvc)[ Docs](https://github.com/aseguragonzalez/php-mvc)[ RSS](/packages/aseguragonzalez-php-mvc/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (11)Versions (16)Used By (0)

PHP MVC
=======

[](#php-mvc)

[![Packagist Version](https://camo.githubusercontent.com/b81f02039edac73b784ab9b4ba9ecdd364e76617ec896945d8e937192b73d998/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61736567757261676f6e7a616c657a2f7068702d6d7663)](https://packagist.org/packages/aseguragonzalez/php-mvc)[![PHP](https://camo.githubusercontent.com/c62b1d5b83f32dbee27a18a5d0003c0cfd55810138870f91316dc71060108163/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61736567757261676f6e7a616c657a2f7068702d6d7663)](https://packagist.org/packages/aseguragonzalez/php-mvc)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)[![CI](https://github.com/aseguragonzalez/php-mvc/actions/workflows/ci.yml/badge.svg)](https://github.com/aseguragonzalez/php-mvc/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/1622391c0e73a80c6870054bee7967d054b30e5313305e003e65676e2a59a86b/68747470733a2f2f636f6465636f762e696f2f67682f61736567757261676f6e7a616c657a2f7068702d6d76632f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/aseguragonzalez/php-mvc)[![PHPStan](https://camo.githubusercontent.com/3a107a3766189dd1f544b2f871ebf3d6ca1e437e63b3b03c3ca6940753d64283/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6d61782d626c7565)](https://phpstan.org/)[![PSR-15](https://camo.githubusercontent.com/df73b69c99584209cac79721cef94c6d2d2281351b2f3a2de0401ce4bb2f0e19/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d2d31352d636f6d70617469626c652d627269676874677265656e)](https://www.php-fig.org/psr/psr-15/)

Lightweight PHP 8.4+ MVC framework for building simple web applications. Routing, controllers, middleware, views, and a small set of opt-in modules (migrations, authentication, background tasks) — with only PSR standard interfaces as runtime dependencies.

Requirements
------------

[](#requirements)

- PHP 8.4 or later
- Composer 2.x

Getting started
---------------

[](#getting-started)

### Install

[](#install)

```
composer require aseguragonzalez/php-mvc
```

### Create an app

[](#create-an-app)

```
vendor/bin/mvc create-app ./src/MyApp --name=MyApp --namespace=App\\MyApp
```

This generates the folder structure, a bootstrap file, and an `mvc.config.json` configuration file.

### Enable optional modules

[](#enable-optional-modules)

Each module is opt-in and can be activated through the CLI:

```
vendor/bin/mvc migrations:enable   # SQL migrations via timestamped scripts
vendor/bin/mvc auth:enable         # Authentication and authorization
vendor/bin/mvc bg-tasks:enable     # Background task processing
```

Once enabled, each module exposes additional CLI commands (e.g. `migrations:create`, `migrations:run`). See the [CLI reference](https://aseguragonzalez.github.io/php-mvc/cli/reference/) for the full list.

Documentation
-------------

[](#documentation)

Full documentation is available at [aseguragonzalez.github.io/php-mvc](https://aseguragonzalez.github.io/php-mvc/).

Development
-----------

[](#development)

### Dev container

[](#dev-container)

All tooling (PHP, Composer, PHPStan, PHP-CS-Fixer, MkDocs) runs inside the dev container. Start it once from the project root:

```
devcontainer up --workspace-folder .
```

Then run any make target with:

```
devcontainer exec --workspace-folder . make
```

**Debugging:** The Xdebug port is **9003**. Configure your IDE or Xdebug client to connect to that port.

### Make targets

[](#make-targets)

All targets must be run inside the dev container — the required tools are not available on the host.

CommandDescription`make install`Install Composer dependencies`make test`Run the test suite`make cs`Check code style (dry-run)`make cs-fix`Auto-fix code style`make stan`Run static analysis (PHPStan max)`make check`Run `cs + stan + test``make all`Run `install + cs-fix + check``make docs-serve`Serve the documentation site on port 8001### Documentation site

[](#documentation-site)

The documentation site uses [MkDocs Material](https://squidfunk.github.io/mkdocs-material/). Dependencies are installed automatically when the dev container is created.

```
devcontainer exec --workspace-folder . make docs-serve
```

Then open **** in your browser. The dev container forwards port 8001 automatically; if you use VS Code with the Dev Containers extension the browser opens on its own.

Built with
----------

[](#built-with)

- [PHPUnit](https://phpunit.de/) ^12.5 — test suite
- [PHPStan](https://phpstan.org/) ^2.1 — static analysis at max level
- [PHP-CS-Fixer](https://cs.symfony.com/) ^3.95 — code style
- [FakerPHP](https://fakerphp.org/) ^1.24 — test data generation
- [vfsStream](https://github.com/bovigo/vfsStream) ^1.6 — virtual filesystem for tests

Contributing
------------

[](#contributing)

Contributions are welcome. Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) and [CODE\_OF\_CONDUCT.md](.github/CODE_OF_CONDUCT.md) before opening a pull request.

Security
--------

[](#security)

See [SECURITY.md](.github/SECURITY.md) for the responsible disclosure process.

License
-------

[](#license)

[MIT License](LICENSE). Copyright (c) 2026 Alfonso Segura.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance98

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

12d ago

PHP version history (2 changes)v0.0.0PHP ^8.3 || ^8.4

v0.1.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/f90a221c139c04cded0d8056aa619c2849de13cadd505c4f5f6b74a580be87fc?d=identicon)[Alfonso Segura](/maintainers/Alfonso%20Segura)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![aseguragonzalez](https://avatars.githubusercontent.com/u/2671340?v=4)](https://github.com/aseguragonzalez "aseguragonzalez (10 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (2 commits)")

---

Tags

mvc-frameworkphpresbooking

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aseguragonzalez-php-mvc/health.svg)

```
[![Health](https://phpackages.com/badges/aseguragonzalez-php-mvc/health.svg)](https://phpackages.com/packages/aseguragonzalez-php-mvc)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[slim/slim

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs

12.3k51.8M1.4k](/packages/slim-slim)[typo3/cms-core

TYPO3 CMS Core

3312.9M4.7k](/packages/typo3-cms-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
