PHPackages                             hongxunpan/simple-php - 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. hongxunpan/simple-php

ActiveProject[Framework](/categories/framework)

hongxunpan/simple-php
=====================

a simple framework for php

0.1.2(3w ago)1191MITPHPPHP ^8.5CI passing

Since Oct 5Pushed 3w ago1 watchersCompare

[ Source](https://github.com/HongXunPan/simple-php)[ Packagist](https://packagist.org/packages/hongxunpan/simple-php)[ RSS](/packages/hongxunpan-simple-php/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

simple-php
==========

[](#simple-php)

`hongxunpan/simple-php` 是基于 `hongxunpan/simple-framework` 的最小项目骨架，要求 PHP `^8.5`。

创建项目
----

[](#创建项目)

```
composer create-project hongxunpan/simple-php
```

复制环境配置并按项目需要调整：

```
cp .env.example .env
```

生产环境必须保持：

```
APP_ENV=production
APP_DEBUG=false
```

访问
--

[](#访问)

Web Server 的站点根目录应指向 `public/`，所有应用请求进入 `public/index.php`。

也可以在 CLI 下执行最小启动验证：

```
REQUEST_METHOD=GET REQUEST_URI=/ php public/index.php
```

按需启用 Module
-----------

[](#按需启用-module)

Composer 安装只负责把 Module 包放入 `vendor`，不会自动启用运行能力：

```
composer require
php bin/simple module:enable
```

项目通过 `config('module.enable')` 记录已启用 Module，通过 `config('module.provider-override')` 登记项目级覆盖 Provider。常用命令：

```
php bin/simple module:status
php bin/simple module:refresh
php bin/simple module:disable
```

`module:enable`、`module:refresh` 和 `module:disable` 均支持 `--dry-run` 预览。项目 Provider 的注册顺序晚于 Module Provider，可覆盖 Module 的默认容器绑定。Module 命令会规范化写回完整 `config/module.php`，仅改变 `module.enable` 的值并保留 `module.provider-override`；发生实际变更后会清理启动缓存。

启动缓存
----

[](#启动缓存)

framework 只管理项目的配置缓存与最终路由缓存：

```
bootstrap/cache/config.php
bootstrap/cache/routes.php

```

开发环境通常不需要生成缓存。缓存缺失时，应用会读取项目 `config/*.php` 与 `routes/*.php`，但不会在请求或 Worker 运行时补写文件。

常用命令：

```
php bin/simple bootstrap:clear
php bin/simple bootstrap:cache
```

`bootstrap:clear` 可重复执行，只删除 framework 管理的两个缓存文件；`bootstrap:cache` 会先清理旧缓存，再从项目源码配置和路由显式构建新缓存。Composer 安装或更新阶段按以下顺序执行：

```
module:refresh
→ bootstrap:clear

```

Composer 不自动预热缓存。生产部署应在依赖安装、环境变量和项目配置就绪后，由最终运行身份或与其共享权限的部署身份执行：

```
php bin/simple bootstrap:cache
```

缓存文件使用原子替换并明确生成成 `0644`；缓存目录缺失时按 `0755` 创建。部署仍应保证 FPM、定时任务和 Worker 对项目目录具有读取权限，不要依赖首次请求生成缓存，也不要由不同身份反复覆盖缓存。

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance95

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~463 days

Total

4

Last Release

22d ago

PHP version history (2 changes)0.0.1PHP ^8.0.20

0.1.0PHP ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/37c4ffcd9218f6b9722875da1ec37f20b0118651687de5798972f919bd2c1eb4?d=identicon)[HongXunPan](/maintainers/HongXunPan)

---

Top Contributors

[![HongXunPan](https://avatars.githubusercontent.com/u/25816508?v=4)](https://github.com/HongXunPan "HongXunPan (24 commits)")

### Embed Badge

![Health badge](/badges/hongxunpan-simple-php/health.svg)

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

###  Alternatives

[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)

PHPackages © 2026

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