Volver al ranking

mix-php/mix

PHP

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

swoolecoroutineframeworkhttpwebsokcetmixgrpcmixphpworkermanclimix-php
Crecimiento de estrellas
Estrellas
1.9k
Forks
213
Crecimiento semanal
Issues
1
5001k1.5k
jun 2017jun 2020jul 2023jul 2026
ArtefactosPackagistcomposer require mix-php/mix
README

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

推荐阅读

技术交流

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

Golang 框架

OpenMix 同时还有 Golang 生态的框架

License

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

Repositorios relacionados
swoole/swoole-src

🚀 Coroutine-based concurrency library for PHP

C++Apache License 2.0swoolecoroutines
swoole.com
18.9k3.1k
hyperf/hyperf

🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

PHPPackagistMIT Licenseswoolecoroutine
hyperf.io
6.9k1.3k
swoft-cloud/swoft

🚀 PHP Microservice Full Coroutine Framework

PHPPackagistApache License 2.0swoolecoroutine
swoft.org
5.5k765
easy-swoole/easyswoole

swoole,easyswoole,swoole framework

PHPPackagistApache License 2.0swooleeasyswoole
easyswoole.com
4.8k503
swooletw/laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.

PHPPackagistMIT Licenseswooleswoole-server
4k383
laravel/octane

Supercharge your Laravel application's performance.

PHPPackagistMIT Licenselaraveloctane
laravel.com/docs/octane
4k342
hhxsv5/laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

PHPPackagistMIT Licenseswoolelaravel
3.9k465
colinlet/PHP-Interview-QA

系统性的 PHP 技术面试问答大全(面经)。涵盖 PHP8、MySQL、Redis、Nginx、系统设计、算法、Laravel 源码及高并发架构原理,助你斩获后端研发 Offer。PHP Interview Questions & Answers.

TypeScriptnpmApache License 2.0algorithmarchitecture
colinlet.github.io/PHP-Interview-QA/
3k563
viest/php-ext-xlswriter

🚀 PHP Extension for creating and reader XLSX files.

CBSD 2-Clause "Simplified" Licensephpexcel
xlswriter.viest.me
2.4k236
viest/php-ext-xlsxwriter

🚀 PHP Extension for creating and reader XLSX files.

CBSD 2-Clause "Simplified" Licensephpexcel
xlswriter.viest.me
2.3k234
Tencent/tsf

coroutine and Swoole based php server framework in tencent

PHPPackagistOtherphpswoole
2.1k474
crazywhalecc/static-php-cli

Build standalone portable PHP binaries on Linux, macOS, Windows, with PHP project together, with popular extensions included.

PHPPackagistMIT Licenseswoolephp
static-php.dev
1.9k395