PHPackages                             yurunsoft/imi - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. yurunsoft/imi

Abandoned → [imiphp/imi](/?search=imiphp%2Fimi)Library[HTTP &amp; Networking](/categories/http)

yurunsoft/imi
=============

imi 是一款支持长连接微服务分布式的 PHP 开发框架，可在 PHP-FPM、Swoole、Workerman 和 RoadRunner 等多种容器环境下运行。它支持 HttpApi、WebSocket、TCP、UDP、MQTT 服务的开发。

v2.1.65(7mo ago)1.2k11.8k172[15 issues](https://github.com/imiphp/imi/issues)[2 PRs](https://github.com/imiphp/imi/pulls)3MulanPSL-2.0PHPPHP &gt;=7.4CI failing

Since Jun 21Pushed 2mo ago33 watchersCompare

[ Source](https://github.com/imiphp/imi)[ Packagist](https://packagist.org/packages/yurunsoft/imi)[ Fund](https://www.imiphp.com/donate.html)[ GitHub Sponsors](https://github.com/Yurunsoft)[ RSS](/packages/yurunsoft-imi/feed)WikiDiscussions 2.1 Synced 3d ago

READMEChangelog (10)Dependencies (29)Versions (230)Used By (3)

imi - PHP 长连接微服务分布式开发框架
=======================

[](#imi---php-长连接微服务分布式开发框架)

 [ ![imi](https://camo.githubusercontent.com/836102978a3b61c96e3ed1939208522e276f666464c21ad2da3de2c74d04d3a1/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f696d697068702f696d6940322e312f7265732f6c6f676f2e706e67) ](https://www.imiphp.com)

[![Latest Version](https://camo.githubusercontent.com/4f0944daab725c1f9617f13c255d47f17f04daae5b74584058c1c8011ce92172/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d697068702f696d692e737667)](https://packagist.org/packages/imiphp/imi)[![GitHub Workflow Status (branch)](https://camo.githubusercontent.com/00f791afd0a67145912183e22717448a0338d6cd9832f6b972bd7d6665a9f55f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696d697068702f696d692f63692e796d6c3f6272616e63683d322e31)](https://camo.githubusercontent.com/00f791afd0a67145912183e22717448a0338d6cd9832f6b972bd7d6665a9f55f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696d697068702f696d692f63692e796d6c3f6272616e63683d322e31)[![Php Version](https://camo.githubusercontent.com/4a5c2ab20974058a8bab53ecb30ac4c2e6bb961df6229b7386fdc097ab53dfa8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e342d627269676874677265656e2e737667)](https://secure.php.net/)[![Swoole Version](https://camo.githubusercontent.com/2b08ceed852c672ccac1ba1e0db0399fd6c269b1f40d58b8d4cf11455a95446d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73776f6f6c652d2533453d342e382e302d627269676874677265656e2e737667)](https://github.com/swoole/swoole-src)[![imi Doc](https://camo.githubusercontent.com/8a45ed26be92338e9c97fc73a6d772a77ee94fb973e93efc89decb1ea59a8bd7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d70617373696e672d677265656e2e737667)](https://doc.imiphp.com/v2.1/)[![imi License](https://camo.githubusercontent.com/98bdbfaa35e79370786c656980aab520be3e8af9551d8418a3ca4da1775f84c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d756c616e50534c253230322e302d627269676874677265656e2e737667)](https://github.com/imiphp/imi/blob/master/LICENSE)[![star](https://camo.githubusercontent.com/aabd6062050fb143d10f586111d8c5aab1069c642513786c02c88b38ddde6e87/68747470733a2f2f67697465652e636f6d2f797572756e736f66742f494d492f62616467652f737461722e7376673f7468656d653d677670)](https://gitee.com/yurunsoft/IMI/stargazers)[![codecov](https://camo.githubusercontent.com/3b3f9128f351875af17890bab4fb7499980907ecd218a7437cec023fc9eaf97f/68747470733a2f2f636f6465636f762e696f2f6769746875622f696d697068702f696d692f6272616e63682f322e312f67726170682f62616467652e7376673f746f6b656e3d59724e52516762526532)](https://codecov.io/github/imiphp/imi)

介绍
--

[](#介绍)

imi 是一款支持长连接微服务分布式的 PHP 开发框架，它可以运行在 `PHP-FPM`、`Swoole`、`Workerman` 和 `RoadRunner` 等多种容器环境下。

imi 提供了丰富的基础功能：`MySQL`、`PostgreSQL`、`Redis`、`超强超好用的自研 ORM`、`连接池`、`Web Api`、`Web MVC`、`WebSocket`、`TCP Server`、`UDP Server`、`HTTP2`、`MQTT`、`gRPC`、`容器化（Container）`、`依赖注入`、`Aop`、`事件`、`异步（Async）`、`缓存（Cache）`、`命令行（Command）`、`配置化（Config）`、`上下文（Context）`、`定时任务（Cron）`、`门面（Facade）`、`验证器（Validate）`、`锁（Lock）`、`日志（Log）`、`定时器（Timer）`、`权限控制`、`消息队列（RabbitMQ、Kafka、Redis）`、`Swagger`、`Hprose`、`宏（Macro）`、`限流`、`共享内存`、`Smarty`、`雪花算法发号器（Snowflake）`、`Workerman Gateway`、`InfluxDB` 和 `TDengine` 等组件。

同时，imi 还提供了微服务相关支持：`Nacos 配置中心`、`etcd 配置中心`、`Nacos 服务注册`、`Nacos 服务发现`、`Swoole Tracker`、`Zipkin`、`Jaeger`、`Prometheus`、`InfluxDB 服务指标监控`、`TDengine 服务指标监控` 和 `负载均衡` 等组件。

除此之外，imi 还提供了管理后台开发骨架 [imi-admin](https://gitee.com/phpben/imi-admin)。

imi 框架自 2018 年 6 月 21 日首次发布以来，已经稳定运行在许多项目中，例如文旅电商平台、物联网充电云平台、停车云平台、支付微服务、短信微服务、钱包微服务、卡牌游戏服务端和数据迁移服务（虎扑）等项目。

> 项目已于 2025-12-31 23:59:59 停止维护，旧项目可继续使用，不推荐新项目使用 imi 框架！

社群
--

[](#社群)

**imi 框架交流群：** 17916227 [![点击加群](https://camo.githubusercontent.com/75b53e353bb9e5064662e185a6d39f4bb88c4e45bd3a1240ddf599525edb6afa/68747470733a2f2f7075622e69647171696d672e636f6d2f7770612f696d616765732f67726f75702e706e67 "点击加群")](https://jq.qq.com/?_wv=1027&k=5wXf4Zq)

**微信群：**（请注明来意）

[![imi](res/wechat.png)](res/wechat.png)

**打赏赞助：**

官方视频教程（完全免费）
------------

[](#官方视频教程完全免费)

imi 2.0 基础视频教程(免费连载中):

imi 1.0 框架入门教程（免费11集全）

imi 框架进阶教程——五子棋游戏开发(免费7集全)

### 扩展组件

[](#扩展组件)

#### 优秀的第三方组件

[](#优秀的第三方组件)

- [权限控制 (phpben/imi-auth)](https://gitee.com/phpben/imi-auth)
- [注册中心 (phpben/imi-config-center)](https://gitee.com/phpben/imi-config-center)
- [模块化路由 (phpben/imi-module-route)](https://gitee.com/phpben/imi-module-route)
- [ThinkPHP6 验证器 (phpben/imi-validate)](https://gitee.com/phpben/imi-validate)

#### 优秀的开源项目

[](#优秀的开源项目)

- [后台管理框架 (phpben/imi-admin)](https://gitee.com/phpben/imi-admin)

开始使用
----

[](#开始使用)

创建 Http Server 项目：`composer create-project imiphp/project-http:~2.1.0`

创建 WebSocket Server 项目：`composer create-project imiphp/project-websocket:~2.1.0`

创建 TCP Server 项目：`composer create-project imiphp/project-tcp:~2.1.0`

创建 UDP Server 项目：`composer create-project imiphp/project-udp:~2.1.0`

创建 gRPC 项目：`composer create-project imiphp/project-grpc:~2.1.0`

创建 MQTT Server 项目：`composer create-project imiphp/project-mqtt:~2.1.0`

[完全开发手册](https://doc.imiphp.com/v2.1/)

运行环境
----

[](#运行环境)

- Linux 系统 (Swoole 不支持在 Windows 上运行)
- [PHP](https://php.net/) &gt;= 7.4
- [Composer](https://getcomposer.org/) &gt;= 2.0
- [Swoole](https://www.swoole.com/) &gt;= 4.8.0
- Redis、PDO 扩展

Docker
------

[](#docker)

推荐使用 Swoole 官方 Docker：

成功案例
----

[](#成功案例)

无论您是在个人项目还是公司项目中使用 imi 开发，无论是开源还是商业项目，都可以向我们提交您的案例。

我们会对您提交的案例进行审查，可能会将其展示在 imi 官网、Swoole 官网等处，这将有助于您的项目推广和发展。

**提交格式：**

- 项目名称
- 项目介绍
- 项目地址（官网/下载地址/Github等至少一项）
- 联系方式（电话/邮箱/QQ/微信等至少一项）
- 项目截图（可选）
- 感言

### 案例展示

[](#案例展示)

成功案例：

> imi 有你的案例会发展得更好，欢迎有条件的用户将项目案例挂上来，同时也是一种免费的宣传！

---

版权信息
----

[](#版权信息)

imi 遵循木兰宽松许可证(Mulan PSL v2) 开源协议发布，并提供免费使用。

鸣谢
--

[](#鸣谢)

感谢以下开源项目 (按字母顺序排列) 为 imi 提供强力支持！

- [doctrine/annotations](https://github.com/doctrine/annotations) (PHP 注解处理类库)
- [PHP](https://php.net/) (没有 PHP 就没有 imi)
- [Swoole](https://www.swoole.com/) (没有 Swoole 就没有 imi)

贡献者
---

[](#贡献者)

[![贡献者](https://camo.githubusercontent.com/659fea83d3dbe41d502a5ef2331eec819c6124bc097abeced1e2907e323c912a/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f494d492f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365)](https://github.com/imiphp/imi/graphs/contributors)

你想出现在贡献者列表中吗？

你可以做的事（包括但不限于以下）：

- 纠正拼写、错别字
- 完善注释
- bug修复
- 功能开发
- 文档编写
- 教程、博客分享

提交 `Pull Request` 到本仓库，你可以成为 imi 的贡献者！

参与框架开发教程详见：

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance78

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 95.4% 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 ~12 days

Recently: every ~161 days

Total

225

Last Release

61d ago

Major Versions

v1.3.15 → v2.0.72021-10-09

v1.3.16 → v2.0.112021-11-05

v1.3.17 → v2.0.122021-11-14

1.x-dev → v2.0.232022-02-12

v2.1.63 → 3.0.x-dev2024-06-10

PHP version history (5 changes)v0.0.1-alphaPHP &gt;=7.0.0

v0.0.3PHP &gt;=7.1.0

v2.0.0PHP &gt;=7.4

v2.0.44PHP &gt;=7.4 &lt;8.2

3.0.x-devPHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f917bb42280d114c53cebadc2942a13ee03abe14971089f88895e266d637169?d=identicon)[Yurunsoft](/maintainers/Yurunsoft)

---

Top Contributors

[![Yurunsoft](https://avatars.githubusercontent.com/u/20104656?v=4)](https://github.com/Yurunsoft "Yurunsoft (3603 commits)")[![NHZEX](https://avatars.githubusercontent.com/u/14545600?v=4)](https://github.com/NHZEX "NHZEX (68 commits)")[![Eno-CN](https://avatars.githubusercontent.com/u/32012269?v=4)](https://github.com/Eno-CN "Eno-CN (20 commits)")[![lovefc](https://avatars.githubusercontent.com/u/18413965?v=4)](https://github.com/lovefc "lovefc (17 commits)")[![loyating](https://avatars.githubusercontent.com/u/5088390?v=4)](https://github.com/loyating "loyating (12 commits)")[![sy-records](https://avatars.githubusercontent.com/u/33931153?v=4)](https://github.com/sy-records "sy-records (8 commits)")[![Mjc960512](https://avatars.githubusercontent.com/u/41005585?v=4)](https://github.com/Mjc960512 "Mjc960512 (5 commits)")[![hurricanetx](https://avatars.githubusercontent.com/u/3157088?v=4)](https://github.com/hurricanetx "hurricanetx (4 commits)")[![cyycler](https://avatars.githubusercontent.com/u/42498453?v=4)](https://github.com/cyycler "cyycler (4 commits)")[![mrlovables](https://avatars.githubusercontent.com/u/16332777?v=4)](https://github.com/mrlovables "mrlovables (3 commits)")[![Rodots](https://avatars.githubusercontent.com/u/50762123?v=4)](https://github.com/Rodots "Rodots (3 commits)")[![xiaohe4966](https://avatars.githubusercontent.com/u/20166341?v=4)](https://github.com/xiaohe4966 "xiaohe4966 (3 commits)")[![0HG0](https://avatars.githubusercontent.com/u/46053324?v=4)](https://github.com/0HG0 "0HG0 (2 commits)")[![wiilruo](https://avatars.githubusercontent.com/u/130130871?v=4)](https://github.com/wiilruo "wiilruo (2 commits)")[![priziw](https://avatars.githubusercontent.com/u/165686325?v=4)](https://github.com/priziw "priziw (2 commits)")[![fengyikang88](https://avatars.githubusercontent.com/u/54435163?v=4)](https://github.com/fengyikang88 "fengyikang88 (2 commits)")[![ooing](https://avatars.githubusercontent.com/u/5188151?v=4)](https://github.com/ooing "ooing (2 commits)")[![beiqil-ban](https://avatars.githubusercontent.com/u/41405288?v=4)](https://github.com/beiqil-ban "beiqil-ban (2 commits)")[![yyforeveryl](https://avatars.githubusercontent.com/u/46223670?v=4)](https://github.com/yyforeveryl "yyforeveryl (1 commits)")[![aLoNeIT](https://avatars.githubusercontent.com/u/22443713?v=4)](https://github.com/aLoNeIT "aLoNeIT (1 commits)")

---

Tags

amqpcoroutinegolanggrpcimijwtkafkamqttmvcmysqlpgsqlphpphp-frameworkrabbitmqredisroadrunnerswooleswoole-frameworkwebsocketworkerman

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[imiphp/imi

imi 是一款支持长连接微服务分布式的 PHP 开发框架，可在 PHP-FPM、Swoole、Workerman 和 RoadRunner 等多种容器环境下运行。它支持 HttpApi、WebSocket、TCP、UDP、MQTT 服务的开发。

1.2k46.8k30](/packages/imiphp-imi)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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