• Stars
    star
    1,937
  • Rank 23,925 (Top 0.5 %)
  • Language
    PHP
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、Swow、WorkerMan、FPM、CLI-Server

OpenMix 出品:https://openmix.org



MixPHP

Mix PHP

中文 | English

MixPHP 是一个 PHP 命令行模式开发框架;基于 Vega 驱动的 HTTP 可以同时支持 Swoole、Swow、WorkerMan、FPM、CLI-Server 生态,并且可以无缝切换;V3 是一个高度解耦的版本,整体代码基于多个独立的模块构建,即便用户不使用我们的脚手架,也可以使用这些独立模块,并且全部模块都支持原生开发。例如:你可以只使用 mix/vega 来搭配 laravel orm 使用;可以在任意环境中使用 mix/database 和 mix/redis;可以使用 mix/grpc 原生代码编写 gRPC;所有的模块你可以像搭积木一样随意组合。

独立模块

核心模块全部可独立使用,并且都支持原生代码开发。

  • mix/vega PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、Swow、WorkerMan、FPM、CLI-Server
  • mix/database 可在各种环境中使用的轻量数据库,支持 FPM、CLI、Swoole、WorkerMan,可选的连接池 (协程)
  • mix/redis 可在各种环境中使用的 PHP Redis,支持 FPM、CLI、Swoole、WorkerMan,可选的连接池 (协程)
  • mix/redis-subscriber 基于 Swoole 协程的 Redis 原生协议订阅库
  • mix/grpc 基于 Swoole 协程的 PHP gRPC 库,包含 protoc 代码生成器、服务器、客户端
  • mix/websocket 基于 Swoole 协程的 PHP WebSocket 服务器与客户端
  • mix/cli PHP 命令行交互指挥官
  • mix/worker-pool 基于 Swoole 的协程池、工作池库
  • mix/validator 基于 PSR-7 的验证库
  • mix/event 基于 PSR-14 标准的事件调度库
  • mix/init 帮助执行类的静态初始化,通常用于预加载单例

服务器

支持多种服务器驱动,并且可以无缝切换。

开发文档

快速开始

提供了现成的脚手架,快速创建项目,立即产出。

composer create-project --prefer-dist mix/cli-skeleton cli
composer create-project --prefer-dist mix/api-skeleton api
composer create-project --prefer-dist mix/web-skeleton web
composer create-project --prefer-dist mix/websocket-skeleton websocket
composer create-project --prefer-dist mix/grpc-skeleton grpc

性能测试

techempower-benchmark.png

web-frameworks-benchmark.png

推荐阅读

AD 混联网关

混联网关 - 可编程分布式长连接网关

  • 可用于聊天室、直播弹幕、IM即时通讯、在线客服、网络游戏、硬件通讯、智能家居、物联网等领域的开发
  • 几行代码,免费搞定socket、websocket实时通讯

技术交流

知乎:https://www.zhihu.com/people/onanying
官方QQ群:284806582, 825122875 敲门暗号:phper

Golang 框架

OpenMix 同时还有 Golang 生态的框架

License

Apache License Version 2.0, http://www.apache.org/licenses/

More Repositories

1

swoolefor

监控你的 Swoole 程序文件变化并自动重启服务器 - 适用于开发 / Monitor for any changes in your swoole application and automatically restart the server - perfect for development
PHP
97
star
2

mix-phar-skeleton

Phar command line program development skeleton
PHP
79
star
3

grpc

PHP gRPC based on Swoole coroutine, including protoc code generator, server, and client / 基于 Swoole 协程的 PHP gRPC 库,包含 protoc 代码生成器、服务器、客户端
PHP
52
star
4

vega

💫 Vega is a CLI mode HTTP web framework written in PHP supports Swoole, WorkerMan, FPM, CLI-Server / Vega 是一个用 PHP 编写的 CLI 模式 HTTP 网络框架,支持 Swoole、WorkerMan、FPM、CLI-Server
PHP
51
star
5

guzzle

Guzzle that support the Swoole coroutine
PHP
40
star
6

framework

V1.*, V2.0 框架核心
PHP
27
star
7

micro

PHP microservice development framework deeply integrated with go-micro ecology
PHP
20
star
8

mix-skeleton

Full-featured development skeleton
PHP
15
star
9

swoole-ide-helper-phar

Swoole IDE 自动补全,PHAR 包。
15
star
10

mix-pack

将 PHP 项目打包成 Phar 文件的工具 / A tool for packaging PHP projects into Phar files
PHP
14
star
11

redis-subscriber

Redis native protocol Subscriber based on Swoole coroutine / 基于 Swoole 协程的 Redis 原生协议订阅库
PHP
14
star
12

database

Simple database for use in multiple execution environments, with support for FPM, CLI, Swoole, WorkerMan, and optional connection pool (coroutine) / 可在各种环境中使用的轻量数据库,支持 FPM、CLI、Swoole、WorkerMan,可选的连接池 (协程)
PHP
10
star
13

json-rpc

JSON-RPC library based on Swoole coroutine, including server and client, supports both TCP and HTTP protocols
PHP
7
star
14

mix-micro-skeleton

Microservice development skeleton
PHP
5
star
15

worker-pool

Swoole-based worker pool, coroutine pool / 基于 Swoole 的工作池,协程池
PHP
5
star
16

micro-etcd

Microservice registry-center and config-center using Etcd, developed based on Swoole
PHP
5
star
17

redis

PHP Redis for use in multiple execution environments, with support for FPM, CLI, Swoole, WorkerMan, and optional connection pool (coroutine) / 可在各种环境中使用的 PHP Redis,支持 FPM、CLI、Swoole、WorkerMan,可选的连接池 (协程)
PHP
5
star
18

server

Tcp server library based on Swoole coroutine
PHP
4
star
19

sync-invoke

Swoole synchronous blocking code invoke library
PHP
4
star
20

object-pool

Swoole-based object pool library
PHP
3
star
21

http-message

Http message library based on PSR-7 / PSR-17 standard, supports Swoole, WorkerMan
PHP
3
star
22

fast-route

Routing library based on Fast-Route, following PSR-7 / PSR-15 standard
PHP
3
star
23

tracing-zipkin

Zipkin tracing library based on Opentracing standard
PHP
3
star
24

websocket

PHP WebSocket server and client based on Swoole coroutine / 基于 Swoole 协程的 PHP WebSocket 服务器与客户端
PHP
3
star
25

http-daemon

Mix Httpd,执行 HTTP APP 的服务容器。
PHP
3
star
26

auth

JWT authorization library based on psr-7 standard
PHP
2
star
27

monolog

Monolog support Swoole coroutine and cli console printing
PHP
2
star
28

helper

Common helper methods
PHP
2
star
29

tcp-server

Tcp Server 模块
PHP
2
star
30

middleware

Middleware 模块
PHP
2
star
31

concurrent

Coroutine concurrency library based on Swoole
PHP
2
star
32

micro-hystrix

Microservice circuit breaker, reference spring hystrix, developed based on Swoole
PHP
2
star
33

session

Session library based on Swoole coroutine Redis, following PSR-7 standard
PHP
2
star
34

websocket-daemon

Mix WebSocketd,执行 WebSocket APP 的服务容器。
PHP
2
star
35

validator

Validator based on PSR-7 standard / 基于 PSR-7 标准的验证器
PHP
2
star
36

ini

Ini 模块
PHP
2
star
37

event

Event dispatcher based on PSR-14 standard / 基于 PSR-14 标准的事件调度库
PHP
2
star
38

http-session

Session 组件
PHP
2
star
39

tcp

Tcp 模块
PHP
1
star
40

mix-docs-history

MixPHP 开发文档历史记录
1
star
41

udp

UDP 模块
PHP
1
star
42

websocket-server

WebSocket Server 模块
PHP
1
star
43

cache

Psr-6 standard based cache library, support file, redis storage
PHP
1
star
44

udp-daemon

UDP 守护程序
PHP
1
star
45

tcp-session

Tcp Session 组件
PHP
1
star
46

http-server

Http server library based on Swoole coroutine, following PSR-7 / PSR-15 standard
PHP
1
star
47

udp-server

Mix Udp Server
PHP
1
star
48

http

Http 模块
PHP
1
star
49

tracing

Tracing library, following PSR-7 / PSR-15 / Opentracing standard
PHP
1
star
50

micro-register

Common interface for microservice registry-center library
PHP
1
star
51

api-skeleton

API development skeleton
PHP
1
star
52

view

Simple rendering of PHP native templates
PHP
1
star
53

pagination

Pagination 模块
PHP
1
star
54

micro-config

Common interface for microservice config-center library
PHP
1
star
55

context

Context processing library
PHP
1
star
56

micro-route

Common interface for microservice route library
PHP
1
star
57

captcha

Captcha 模块
PHP
1
star
58

route

Http route library, following PSR-7 / PSR-15 standard
PHP
1
star
59

cli

PHP CLI Interactive Commander / PHP 命令行交互指挥官
PHP
1
star
60

console

Command line console program development library
PHP
1
star
61

micro-server

Common interface for microservice server library
PHP
1
star
62

tcp-daemon

Tcp Daemon 模块
PHP
1
star
63

grpc-skeleton

gRPC development skeleton
PHP
1
star
64

bean

DI, IoC container, reference spring bean
PHP
1
star
65

runtime

Runtime library
PHP
1
star
66

image

Image 模块
PHP
1
star
67

micro-gateway

Mix Micro Gateway
PHP
1
star