aseguragonzalez/php-mvc 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aseguragonzalez/php-mvc

Composer 安装命令:

composer require aseguragonzalez/php-mvc

包简介

Lightweight PHP MVC Framework

README 文档

README

Packagist Version PHP License: MIT CI codecov PHPStan 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

  • PHP 8.4 or later
  • Composer 2.x

Getting started

Install

composer require aseguragonzalez/php-mvc

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

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 for the full list.

Documentation

Full documentation is available at aseguragonzalez.github.io/php-mvc.

Development

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 <target>

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

Make targets

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

Command Description
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

The documentation site uses MkDocs Material. Dependencies are installed automatically when the dev container is created.

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

Then open http://localhost:8001/php-mvc/ 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

Contributing

Contributions are welcome. Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md before opening a pull request.

Security

See SECURITY.md for the responsible disclosure process.

License

MIT License. Copyright (c) 2026 Alfonso Segura.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固