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

ActiveLibrary[Framework](/categories/framework)

apiswoole/apiswoole
===================

PHP 常驻内存型PHP框架

14PHP

Since Mar 29Pushed 8y agoCompare

[ Source](https://github.com/Wonghzx/apiSwoole)[ Packagist](https://packagist.org/packages/apiswoole/apiswoole)[ RSS](/packages/apiswoole-apiswoole/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ApiSwoole Api 框架 ++++开发中++++
============================

[](#apiswoole-api-框架-开发中)

简介
==

[](#简介)

ApiSwoole 是一款基于Swoole Server 原生协程 开发的常驻内存型PHP框架，摆脱PHP 传统的 PHP-FPM 运行模式在进程唤起和文件加载上带来的性能损失。而依旧维持Swoole Server 原有特性，支持HTTP、TCP、UDP、WebSocket协议，可异步，高可用的应用服务。

- 基于 Swoole 扩展
- 内置 HTTP 协程服务器
- 内置 WebSocket 协程服务器
- 内置 RPC 协程服务器
- VC 分层设计 （目前没 M 模式）
- 高性能路由
- 全局容器注入
- 数据库 ORM （数据库迁移Laravel的ORM）
- 自定义用户进程
- Inotify 自动 Reload

环境要求
====

[](#环境要求)

1. PHP 7.X
2. [Swoole 2.x](https://www.swoole.com/), 需开启协程和异步Redis
3. [Composer](https://getcomposer.org/)
4. [Inotify](https://pecl.php.net/package/inotify) (自动 Reload 服务 可选 )在开发过程中经常需要更新文件，由于Swoole常驻内存的特性，文件在框架启动时已经载入了内存，当文件被修改时需要手动重启服务

配置
==

[](#配置)

复制项目根目录的 `.env.example` 并命名为 `.env`

运行安装
====

[](#运行安装)

1. composer update

启动
==

[](#启动)

**HTTP启动**

```
// 启动服务，根据 .env 配置决定是否是守护进程
php apiswoole start

// 重载服务
php apiswoole reload

// 关闭服务
php apiswoole stop
```

**RPC 启动**

```
php apiswoole rpc:start
```

**WebSocket 启动**

```
php apiswoole socket:start
```

启动服务成功

```

         /\                         .-.                  .;
     _  / |             .-. .;;;.`-'                    .;'
    (  /  |  .`..:.     `-';;  (_)`;     .-.-.   .-.   .;  .-.
     `/.__|_.' ;;  :   ;'  `;;;.  ;  ;   ;;   ;';   ;':: .;.-'
 .:' /    |    ;;_.`_.;:._._   `: `.' `.' `;;'  `;;'_;;_.-`:::'
(__.'     `-' .;'         (_.;;;'

 ApiSwoole Version 1.0.0 2018-01-12 17:06:51

 Information Panel:  HttpServer version: 2.0.10
      Listen Address:     0.0.0.0
      Listen Port:        9501
      Worker Num:         8
      Task Worker Num:    8

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/224e66388040572e53ad416f22694ad05bef4d9bba25a3126814ec4b9c7c5d7b?d=identicon)[Wonghzx](/maintainers/Wonghzx)

---

Top Contributors

[![huangzhixue](https://avatars.githubusercontent.com/u/22140744?v=4)](https://github.com/huangzhixue "huangzhixue (32 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

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

1.9k36.7M256](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)

PHPackages © 2026

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