PHPackages                             boxphp/boxphp - 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. boxphp/boxphp

ActiveLibrary[Framework](/categories/framework)

boxphp/boxphp
=============

BoxPHP Framework - Full Stack PHP Framework

1.0.0(today)00MITPHPPHP &gt;=8.1

Since Jun 27Pushed todayCompare

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

READMEChangelogDependencies (6)Versions (2)Used By (0)

boxphp/boxphp
=============

[](#boxphpboxphp)

BoxPHP 框架 - 基于 Workerman 的高性能 PHP 框架

安装
--

[](#安装)

```
composer require boxphp/boxphp
```

快速开始
----

[](#快速开始)

### 创建项目

[](#创建项目)

```
composer create-project boxphp/boxphp myapp
cd myapp
```

### 启动开发服务器

[](#启动开发服务器)

```
./box serve
# 或
php box serve --port=8080
```

核心组件
----

[](#核心组件)

### Application 应用

[](#application-应用)

```
use BoxPHP\App\Application\Application;

$app = new Application(__DIR__);
$app->boot();

// 获取配置
$app->config('app.name');

// 获取容器
$app->container()->bind('service', fn() => new Service());

// 获取事件分发器
$app->events()->emit('app.ready');
```

### CLI 命令

[](#cli-命令)

```
box help              # 显示帮助
box version           # 显示版本
box serve             # 启动开发服务器
box list              # 列出所有命令
box make:controller   # 创建控制器
box make:model        # 创建模型
```

### 测试

[](#测试)

```
use BoxPHP\App\Testing\TestCase;

class UserTest extends TestCase
{
    public function testGetUser(): void
    {
        $response = $this->httpGet('/users/1');
        $this->assertEquals(200, $response->getStatus());
    }

    public function testCreateUser(): void
    {
        $response = $this->httpPost('/users', ['name' => 'John']);
        $this->assertEquals(201, $response->getStatus());
    }
}
```

辅助函数
----

[](#辅助函数)

```
// 获取应用实例
$app = app();

// 获取配置
$name = config('app.name');

// 获取容器中的服务
$service = app('service');

// 触发事件
event('user.created', $user);

// 获取日志
logger()->info('User created');
```

目录结构
----

[](#目录结构)

```
myapp/
├── app/
│   └── Controllers/
├── config/
│   ├── app.php
│   └── database.php
├── public/
│   └── index.php
├── routes/
│   └── web.php
├── storage/
│   └── logs/
├── box
└── composer.json

```

依赖
--

[](#依赖)

- PHP &gt;= 8.1
- boxphp/core ^1.0
- boxphp/server ^1.0
- boxphp/redis ^1.0
- boxphp/database ^1.0
- boxphp/tenant ^1.0
- boxphp/queue ^1.0

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9910314?v=4)[tvjojo ](/maintainers/tvjojo)[@tvjojo](https://github.com/tvjojo)

---

Top Contributors

[![tvjojo](https://avatars.githubusercontent.com/u/9910314?v=4)](https://github.com/tvjojo "tvjojo (7 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/socialite

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

5.7k104.3M832](/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)
