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. [Framework](/categories/framework)
4. /
5. phosphor/framework

ActiveLibrary[Framework](/categories/framework)

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

Phosphor — AI 驱动的 PHP 框架核心

10PHP

Since Mar 19Pushed 3mo agoCompare

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

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

19

—

LowBetter than 9% of packages

Maintenance55

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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://avatars.githubusercontent.com/u/17340200?v=4)[离骚](/maintainers/yuanxin32323)[@yuanxin32323](https://github.com/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)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M829](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

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

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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