Skip to content

Commit

Permalink
3.0,启动!
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 13, 2023
1 parent 5d2eeb9 commit 4fe5f4c
Show file tree
Hide file tree
Showing 95 changed files with 238 additions and 237 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
gitee:
if: github.repository == 'imiphp/imi' && (github.ref == 'refs/heads/2.1')
if: github.repository == 'imiphp/imi' && (github.ref == 'refs/heads/3.0')
runs-on: ubuntu-20.04
steps:
- uses: ahmadnassri/action-workflow-queue@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/split-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: split repository
on:
push:
branches:
- "2.1"
- "3.0"
release:
types: [published]

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

<p align="center">
<a href="https://www.imiphp.com" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/imiphp/imi@2.1/res/logo.png" alt="imi" />
<img src="https://cdn.jsdelivr.net/gh/imiphp/imi@3.0/res/logo.png" alt="imi" />
</a>
</p>

[![Latest Version](https://img.shields.io/packagist/v/imiphp/imi.svg)](https://packagist.org/packages/imiphp/imi)
![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/imiphp/imi/ci.yml?branch=2.1)
![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/imiphp/imi/ci.yml?branch=3.0)
[![Php Version](https://img.shields.io/badge/php-%3E=7.4-brightgreen.svg)](https://secure.php.net/)
[![Swoole Version](https://img.shields.io/badge/swoole-%3E=4.8.0-brightgreen.svg)](https://github.com/swoole/swoole-src)
[![imi Doc](https://img.shields.io/badge/docs-passing-green.svg)](https://doc.imiphp.com/v2.1/)
[![imi Doc](https://img.shields.io/badge/docs-passing-green.svg)](https://doc.imiphp.com/v3.0/)
[![imi License](https://img.shields.io/badge/license-MulanPSL%202.0-brightgreen.svg)](https://github.com/imiphp/imi/blob/master/LICENSE)
[![star](https://gitee.com/yurunsoft/IMI/badge/star.svg?theme=gvp)](https://gitee.com/yurunsoft/IMI/stargazers)
[![codecov](https://codecov.io/github/imiphp/imi/branch/2.1/graph/badge.svg?token=YrNRQgbRe2)](https://codecov.io/github/imiphp/imi)
[![codecov](https://codecov.io/github/imiphp/imi/branch/3.0/graph/badge.svg?token=YrNRQgbRe2)](https://codecov.io/github/imiphp/imi)

## 介绍

Expand Down Expand Up @@ -75,19 +75,19 @@ imi 框架进阶教程——五子棋游戏开发(免费7集全)<https://space.b

## 开始使用

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

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

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

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

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

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

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

## 运行环境

Expand Down Expand Up @@ -153,4 +153,4 @@ imi 遵循木兰宽松许可证(Mulan PSL v2) 开源协议发布,并提供免

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

参与框架开发教程详见:<https://doc.imiphp.com/v2.1/adv/devp.html>
参与框架开发教程详见:<https://doc.imiphp.com/v3.0/adv/devp.html>
20 changes: 10 additions & 10 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 项目介绍

![imi logo](https://cdn.jsdelivr.net/gh/imiphp/imi@2.1/res/logo.png)
![imi logo](https://cdn.jsdelivr.net/gh/imiphp/imi@3.0/res/logo.png)

[![Latest Version](https://img.shields.io/packagist/v/imiphp/imi.svg)](https://packagist.org/packages/imiphp/imi) ![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/imiphp/imi/ci.yml?branch=2.1) [![Php Version](https://img.shields.io/badge/php-%3E=7.4-brightgreen.svg)](https://secure.php.net/) [![Swoole Version](https://img.shields.io/badge/swoole-%3E=4.8.0-brightgreen.svg)](https://github.com/swoole/swoole-src) [![imi Doc](https://img.shields.io/badge/docs-passing-green.svg)](/v2.1/) [![imi License](https://img.shields.io/badge/license-MulanPSL%202.0-brightgreen.svg)](https://github.com/imiphp/imi/blob/master/LICENSE) [![star](https://gitee.com/yurunsoft/IMI/badge/star.svg?theme=gvp)](https://gitee.com/yurunsoft/IMI/stargazers)
[![Latest Version](https://img.shields.io/packagist/v/imiphp/imi.svg)](https://packagist.org/packages/imiphp/imi) ![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/imiphp/imi/ci.yml?branch=3.0) [![Php Version](https://img.shields.io/badge/php-%3E=7.4-brightgreen.svg)](https://secure.php.net/) [![Swoole Version](https://img.shields.io/badge/swoole-%3E=4.8.0-brightgreen.svg)](https://github.com/swoole/swoole-src) [![imi Doc](https://img.shields.io/badge/docs-passing-green.svg)](/v3.0/) [![imi License](https://img.shields.io/badge/license-MulanPSL%202.0-brightgreen.svg)](https://github.com/imiphp/imi/blob/master/LICENSE) [![star](https://gitee.com/yurunsoft/IMI/badge/star.svg?theme=gvp)](https://gitee.com/yurunsoft/IMI/stargazers)

## 介绍

Expand Down Expand Up @@ -64,19 +64,19 @@ imi 框架进阶教程——五子棋游戏开发(免费7集全)<https://space.b

## 开始使用

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

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

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

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

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

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

[完全开发手册](/v2.1/)
[完全开发手册](/v3.0/)

## 运行环境

Expand Down Expand Up @@ -142,4 +142,4 @@ imi 遵循木兰宽松许可证(Mulan PSL v2)开源协议发布,并提供

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

参与框架开发教程详见:[链接](/v2.1/adv/devp.html)
参与框架开发教程详见:[链接](/v3.0/adv/devp.html)
4 changes: 2 additions & 2 deletions doc/annotations/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ class TransactionAop
}
```

具体用法请参考:[链接](/v2.1/components/aop/index.html)
具体用法请参考:[链接](/v3.0/components/aop/index.html)

## 获取注解

具体用法请参考:[链接](/v2.1/annotations/annotationManager.html)
具体用法请参考:[链接](/v3.0/annotations/annotationManager.html)

## 编写处理器

Expand Down
12 changes: 6 additions & 6 deletions doc/base/new.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

imi 提供了多个项目模板可供选择:

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

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

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

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

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

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

运行命令后,会在当前目录创建一个新的 imi 项目,并下载所需的依赖。

Expand Down
2 changes: 1 addition & 1 deletion doc/base/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PDOException: SQLSTATE[42000]: Syntax error or access violation: 1461 Can't crea

imi 默认会缓存 Statement,建议调大 mysql 的 `max_prepared_stmt_count` 配置值。

从 imi v2.1.34 开始你也可以配置 [Statement 最大缓存数量](/v2.1/components/db/config.html) 来自动清理缓存的 Statement。
从 imi v2.1.34 开始你也可以配置 [Statement 最大缓存数量](/v3.0/components/db/config.html) 来自动清理缓存的 Statement。

## Workerman 报错:send buffer full and drop package

Expand Down
4 changes: 2 additions & 2 deletions doc/components/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ imi 框架的权限控制组件,不提供具体 API、管理界面,仅提供
```json
{
"require": {
"imiphp/imi-access-control": "~2.1.0"
"imiphp/imi-access-control": "~3.0.0"
}
}
```
Expand All @@ -38,7 +38,7 @@ imi 框架的权限控制组件,不提供具体 API、管理界面,仅提供
```

本组件中包含几个数据表,打开本组件目录,找到`Model`目录,在数据库中建立对应的表,即可使用。
建表这里优先推荐用`generate/table`[链接](/v2.1/dev/generate/table.html)
建表这里优先推荐用`generate/table`[链接](/v3.0/dev/generate/table.html)

### 操作权限

Expand Down
2 changes: 1 addition & 1 deletion doc/components/cache/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Imi\Cache\CacheManager::clear('缓存名称');
*/
```

`lockable` 用法请参考 [Lock](/v2.1/components/lock/index.html)
`lockable` 用法请参考 [Lock](/v3.0/components/lock/index.html)

`preventBreakdown` 如果设为 `true`,会在获得锁后,尝试获取缓存,如果缓存存在则不再执行方法体

Expand Down
6 changes: 3 additions & 3 deletions doc/components/config/center.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

### Nacos

**安装:**`composer require imiphp/imi-nacos:~2.1.0`
**安装:**`composer require imiphp/imi-nacos:~3.0.0`

**配置:**

Expand Down Expand Up @@ -130,7 +130,7 @@ $configCenter->getDriver('nacos')->push($name, $value, [

### Etcd

**安装:**`composer require imiphp/imi-etcd:~2.1.0`
**安装:**`composer require imiphp/imi-etcd:~3.0.0`

**配置:**

Expand Down Expand Up @@ -211,7 +211,7 @@ $configCenter->getDriver('etcd')->push($name, $value, $options);

* 非 Swoole 用户请安装 [php-zookeeper](<https://github.com/php-zookeeper/php-zookeeper>) 扩展。

**安装:**`composer require imiphp/imi-zookeeper:~2.1.0`
**安装:**`composer require imiphp/imi-zookeeper:~3.0.0`

**配置:**

Expand Down
2 changes: 1 addition & 1 deletion doc/components/httpserver/aop.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

AOP(Aspect-Oriented Programming 面向切面编程)是一种在运行时, 动态地将一段代码片段(切面)切入到指定类、类的指定方法(切入点)等位置, 从而改变其原有的行为的编程思想。可以在不改变原有逻辑的基础上, 增加一些额外的功能,例如日志记录,性能统计,安全控制,事务处理,异常处理等。

详细介绍请见:[链接](/v2.1/components/aop/index.html)
详细介绍请见:[链接](/v3.0/components/aop/index.html)

## Demo

Expand Down
4 changes: 2 additions & 2 deletions doc/components/httpserver/controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ class Index extends HttpController

## 绑定请求参数到控制器方法参数

详见:[链接](/v2.1/components/httpserver/request.html#%E7%BB%91%E5%AE%9A%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0%E5%88%B0%E6%8E%A7%E5%88%B6%E5%99%A8%E6%96%B9%E6%B3%95%E5%8F%82%E6%95%B0)
详见:[链接](/v3.0/components/httpserver/request.html#%E7%BB%91%E5%AE%9A%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0%E5%88%B0%E6%8E%A7%E5%88%B6%E5%99%A8%E6%96%B9%E6%B3%95%E5%8F%82%E6%95%B0)

## 属性

### $server

详见:[链接](/v2.1/core/server.html)
详见:[链接](/v3.0/core/server.html)

### $request

Expand Down
2 changes: 1 addition & 1 deletion doc/components/httpserver/cros.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ imi 框架内置了一个 `OptionsMiddleware` 中间件,用于解决使用 `ap

别名:`OptionsMiddleware`

中间件使用方法:[链接](/v2.1/components/httpserver/middleware.html)
中间件使用方法:[链接](/v3.0/components/httpserver/middleware.html)

## 参数设置

Expand Down
2 changes: 1 addition & 1 deletion doc/components/httpserver/jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ imi v2 使用 2.0 版本
```json
{
"require": {
"imiphp/imi-jwt": "~2.1.0"
"imiphp/imi-jwt": "~3.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion doc/components/httpserver/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[toc]

请先阅读 [验证器](/v2.1/components/validation/index.html) 章节,HTTP 验证器基于验证器扩展,基本使用方式相似。
请先阅读 [验证器](/v3.0/components/validation/index.html) 章节,HTTP 验证器基于验证器扩展,基本使用方式相似。

## @HttpValidation

Expand Down
2 changes: 1 addition & 1 deletion doc/components/influxdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ imi-influxdb:<https://github.com/imiphp/imi-influxdb>
## 安装

`composer require imiphp/imi-influxdb:~2.1.0`
`composer require imiphp/imi-influxdb:~3.0.0`

## 使用说明

Expand Down
2 changes: 1 addition & 1 deletion doc/components/macro.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
```json
{
"require": {
"imiphp/imi-macro": "~2.1.0"
"imiphp/imi-macro": "~3.0.0"
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions doc/components/meter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ imi 接入了服务指标监控能力,提供了 [imi-meter](https://github.com

**支持的中间件:**

* [x] [Prometheus](/v2.1/components/meter/prometheus.html)
* [x] [Prometheus](/v3.0/components/meter/prometheus.html)

* [x] [InfluxDB](/v2.1/components/meter/influxdb.html)
* [x] [InfluxDB](/v3.0/components/meter/influxdb.html)

* [x] [TDengine](/v2.1/components/meter/tdengine.html)
* [x] [TDengine](/v3.0/components/meter/tdengine.html)

……
6 changes: 3 additions & 3 deletions doc/components/meter/influxdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ imi 支持将服务指标监控的数据写入 InfluxDB。

## 安装

`composer require imiphp/imi-influxdb:~2.1.0`
`composer require imiphp/imi-influxdb:~3.0.0`

## 使用说明

imi-influxdb 基础配置和使用说明详见:[链接](/v2.1/components/influxdb.html)
imi-influxdb 基础配置和使用说明详见:[链接](/v3.0/components/influxdb.html)

### 服务指标监控

Expand All @@ -30,7 +30,7 @@ imi-influxdb 基础配置和使用说明详见:[链接](/v2.1/components/influ

#### 安装所需组件

`composer require imiphp/imi-meter:~2.1.0`
`composer require imiphp/imi-meter:~3.0.0`

#### 配置

Expand Down
2 changes: 1 addition & 1 deletion doc/components/meter/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ imi-prometheus:<https://github.com/imiphp/imi-prometheus>

## 安装

`composer require imiphp/imi-prometheus:~2.1.0`
`composer require imiphp/imi-prometheus:~3.0.0`

## 使用说明

Expand Down
2 changes: 1 addition & 1 deletion doc/components/meter/tdengine.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ imi 支持将服务指标监控的数据写入 TDengine。

### InfluxDB 兼容接口

这个写入方式主要依赖 imi-influxdb,文档请移步:[链接](/v2.1/components/meter/influxdb.html)
这个写入方式主要依赖 imi-influxdb,文档请移步:[链接](/v3.0/components/meter/influxdb.html)

在 InfluxDB 配置基础上,只需要做如下修改,即可兼容 TDengine:

Expand Down
4 changes: 2 additions & 2 deletions doc/components/mq/amqp.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Github: <https://github.com/imiphp/imi-amqp>
```json
{
"require": {
"imiphp/imi-amqp": "~2.1.0"
"imiphp/imi-amqp": "~3.0.0"
}
}
```
Expand Down Expand Up @@ -477,7 +477,7 @@ class TestProcess extends BaseProcess

适合计算密集型场景、消费量非常多的场景。

进程池写法参考:[链接](/v2.1/components/process-pool/swoole.html)
进程池写法参考:[链接](/v3.0/components/process-pool/swoole.html)

启动消费者写法参考上面的即可。

Expand Down
2 changes: 1 addition & 1 deletion doc/components/mq/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
```json
{
"require": {
"imiphp/imi-kafka": "~2.1.0"
"imiphp/imi-kafka": "~3.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion doc/components/mq/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
```json
{
"require": {
"imiphp/imi-queue": "~2.1.0"
"imiphp/imi-queue": "~3.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion doc/components/mq/redisStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
```json
{
"require": {
"imiphp/imi-queue": "~2.1.0"
"imiphp/imi-queue": "~3.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion doc/components/mqtt/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MQTT是一个基于客户端-服务器的消息发布/订阅传输协议。MQTT
安装:`composer require imiphp/imi-mqtt`

示例项目:`composer create-project imiphp/project-mqtt:~2.1.0`
示例项目:`composer create-project imiphp/project-mqtt:~3.0.0`

## 配置

Expand Down
Loading

0 comments on commit 4fe5f4c

Please sign in to comment.