PHPackages                             phosphor/framework - 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. phosphor/framework

ActiveLibrary

phosphor/framework
==================

Phosphor — AI 驱动的 PHP 框架核心

10PHP

Since Mar 19Pushed 2d agoCompare

[ Source](https://github.com/yuanxin32323/phosphor)[ Packagist](https://packagist.org/packages/phosphor/framework)[ RSS](/packages/phosphor-framework/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Phosphor
========

[](#phosphor)

> ✨ 光的携带者 — AI 驱动的 PHP 框架核心

Phosphor 是为 **AI + 人类协作** 设计的 PHP 框架。这是框架核心包，提供路由、DI 容器、ORM、日志等基础设施。

安装
--

[](#安装)

### 创建新项目（推荐）

[](#创建新项目推荐)

```
composer create-project phosphor/skeleton my-project
cd my-project
php -S localhost:8080 -t public/
```

### 作为依赖引用

[](#作为依赖引用)

```
composer require phosphor/framework
```

核心组件
----

[](#核心组件)

组件命名空间功能HTTP`Phosphor\Http`Request / Response / JsonResponse路由`Phosphor\Routing`Attribute 路由 + 中间件容器`Phosphor\Container`构造函数自动注入 DIORM`Phosphor\Database`QueryBuilder + BaseRepository模型`Phosphor\Model`Schema Attribute (#\[Table\], #\[Column\])DTO`Phosphor\DTO`InputDTO / OutputDTO验证`Phosphor\Validation`Attribute 验证规则日志`Phosphor\Log`分层日志 (debug.log + app.log)导航`Phosphor\Navigation`ProjectMapWriter + ChangelogWriter异常`Phosphor\Exception`类型化异常 + ExceptionHandler事件`Phosphor\Event`EventDispatcher内核`Phosphor\Kernel`多应用请求生命周期AI 友好设计
-------

[](#ai-友好设计)

- **`.ai/` 目录** — AI 导航中心（项目地图、变更日志、错误索引）
- **分层日志** — debug.log 只保留关键调试信息，AI 一眼看完
- **模式开关** — `framework` / `business` 模式控制 AI 可修改范围
- **全模型入口** — 支持 Cursor / Claude / Gemini / Copilot / GLM / Qwen 等

许可证
---

[](#许可证)

MIT License

###  Health Score

21

—

LowBetter than 21% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/caed1d865f595683ce47966eb1500a61ff6ec96f542fa02e4b3d223def349a07?d=identicon)[yuanxin32323](/maintainers/yuanxin32323)

---

Top Contributors

[![yuanxin32323](https://avatars.githubusercontent.com/u/17340200?v=4)](https://github.com/yuanxin32323 "yuanxin32323 (8 commits)")

### Embed Badge

![Health badge](/badges/phosphor-framework/health.svg)

```
[![Health](https://phpackages.com/badges/phosphor-framework/health.svg)](https://phpackages.com/packages/phosphor-framework)
```

PHPackages © 2026

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