{"id":26818574,"url":"https://github.com/mixstart/mixphp","last_synced_at":"2025-03-30T05:01:49.159Z","repository":{"id":22264775,"uuid":"95281307","full_name":"mix-php/mix","owner":"mix-php","description":"☄️  PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架，支持 Swoole、Swow、WorkerMan、FPM、CLI-Server","archived":false,"fork":false,"pushed_at":"2024-06-06T11:16:22.000Z","size":8446,"stargazers_count":1943,"open_issues_count":1,"forks_count":212,"subscribers_count":71,"default_branch":"master","last_synced_at":"2025-03-26T01:10:02.569Z","etag":null,"topics":["cli","coroutine","framework","grpc","http","mix","mix-php","mixphp","swoole","websokcet","workerman"],"latest_commit_sha":null,"homepage":"https://openmix.org/mix-php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mix-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-24T06:58:03.000Z","updated_at":"2025-03-14T23:57:17.000Z","dependencies_parsed_at":"2023-01-14T08:00:19.337Z","dependency_job_id":"e2131215-ee45-4f95-8ec0-5d273c6a876f","html_url":"https://github.com/mix-php/mix","commit_stats":{"total_commits":2544,"total_committers":18,"mean_commits":"141.33333333333334","dds":0.02358490566037741,"last_synced_commit":"419c824622b86d5ad85f0f36e40c3b656f0c3ee1"},"previous_names":["mixstart/mixphp"],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mix-php%2Fmix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mix-php%2Fmix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mix-php%2Fmix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mix-php%2Fmix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mix-php","download_url":"https://codeload.github.com/mix-php/mix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277352,"owners_count":20751549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","coroutine","framework","grpc","http","mix","mix-php","mixphp","swoole","websokcet","workerman"],"created_at":"2025-03-30T05:01:28.462Z","updated_at":"2025-03-30T05:01:49.150Z","avatar_url":"https://github.com/mix-php.png","language":"PHP","readme":"\u003e OpenMix 出品：https://openmix.org\n\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"https://openmix.org/static/image/logo_php.png\" width=\"120\" alt=\"MixPHP\"\u003e\n    \u003cbr\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eMix PHP\u003c/h1\u003e\n\n中文 | [English](README_EN.md)\n\nMixPHP 是一个 PHP 命令行模式开发框架；基于 `Vega` 驱动的 HTTP 可以同时支持 Swoole、Swow、WorkerMan、FPM、CLI-Server 生态，并且可以无缝切换；`V3` 是一个高度解耦的版本，整体代码基于多个独立的模块构建，即便用户不使用我们的脚手架，也可以使用这些独立模块，并且全部模块都支持原生开发。例如：你可以只使用 mix/vega 来搭配 laravel orm 使用；可以在任意环境中使用 mix/database 和 mix/redis；可以使用 mix/grpc 原生代码编写 gRPC；所有的模块你可以像搭积木一样随意组合。\n\n## 独立模块\n\n核心模块全部可独立使用，并且都支持原生代码开发。\n\n- [mix/vega](src/vega) PHP 编写的 CLI 模式 HTTP 网络框架，支持 Swoole、Swow、WorkerMan、FPM、CLI-Server\n- [mix/database](src/database) 可在各种环境中使用的轻量数据库，支持 FPM、CLI、Swoole、WorkerMan，可选的连接池 (协程)\n- [mix/redis](src/redis) 可在各种环境中使用的 PHP Redis，支持 FPM、CLI、Swoole、WorkerMan，可选的连接池 (协程)\n- [mix/redis-subscriber](src/redis-subscriber) 基于 Swoole 协程的 Redis 原生协议订阅库\n- [mix/grpc](src/grpc) 基于 Swoole 协程的 PHP gRPC 库，包含 protoc 代码生成器、服务器、客户端\n- [mix/websocket](src/websocket) 基于 Swoole 协程的 PHP WebSocket 服务器与客户端\n- [mix/cli](src/cli) PHP 命令行交互指挥官\n- [mix/worker-pool](src/worker-pool) 基于 Swoole 的协程池、工作池库\n- [mix/validator](src/validator) 基于 PSR-7 的验证库\n- [mix/event](src/event) 基于 PSR-14 标准的事件调度库\n- [mix/init](src/init) 帮助执行类的静态初始化，通常用于预加载单例\n\n## 服务器\n\n支持多种服务器驱动，并且可以无缝切换。\n\n- [PHP Built-in CLI-Server](examples/api-skeleton/composer.json#L8) `零扩展依赖` `热更新` `适合本机开发`\n- [PHP-FPM](examples/api-skeleton/public/index.php) `热更新` `适合共享开发` `适合 admin 开发`\n- [Swoole](examples/api-skeleton/composer.json#L9) `常驻内存` `兼容 composer 生态`\n- [Swoole Coroutine](examples/api-skeleton/composer.json#L10) `常驻内存` `协程性能强劲`\n- [Swow](examples/api-skeleton/composer.json#L11) `常驻内存` `纯C协程` `兼容 composer 生态`\n- [WorkerMan](examples/api-skeleton/composer.json#L12) `常驻内存` `兼容 composer 生态`\n\n## 开发文档\n\n- `V3.0` https://openmix.org/mix-php/docs/3.0/\n- `V2.2` https://www.kancloud.cn/onanying/mixphp2-2/content\n- `V2.1` https://www.kancloud.cn/onanying/mixphp2-1/content\n- `V2.0` https://www.kancloud.cn/onanying/mixphp2/content\n- `V1.*` https://www.kancloud.cn/onanying/mixphp1/content\n\n## 快速开始\n\n提供了现成的脚手架，快速创建项目，立即产出。\n\n- [编写一个 CLI 程序](examples/cli-skeleton#readme)\n\n```\ncomposer create-project --prefer-dist mix/cli-skeleton cli\n```\n\n- [编写一个 API 接口](examples/api-skeleton#readme)\n\n```\ncomposer create-project --prefer-dist mix/api-skeleton api\n```\n\n- [编写一个 Web 页面](examples/web-skeleton#readme)\n\n```\ncomposer create-project --prefer-dist mix/web-skeleton web\n```\n\n- [编写一个 WebSocket 服务](examples/websocket-skeleton#readme)\n\n```\ncomposer create-project --prefer-dist mix/websocket-skeleton websocket\n```\n\n- [编写一个 gRPC 接口](examples/grpc-skeleton#readme)\n\n```\ncomposer create-project --prefer-dist mix/grpc-skeleton grpc\n```\n\n## 性能测试\n\n- [TechEmpower Benchmark](https://www.techempower.com/benchmarks/#section=data-r21\u0026test=db\u0026l=zik073-6bj)\n\n![techempower-benchmark.png](techempower-benchmark.png)\n\n- [Web Frameworks Benchmark](https://web-frameworks-benchmark.netlify.app/result?l=php)\n\n![web-frameworks-benchmark.png](web-frameworks-benchmark.png)\n\n## 推荐阅读\n\n- [MixPHP V3 开发流程体验 Swoole, Workerman, FPM, CLI-Server 多种运行模式介绍](https://zhuanlan.zhihu.com/p/398381870)\n- [MixPHP V3 增加了 PHP-FPM、CLI-Server 的支持](https://zhuanlan.zhihu.com/p/394059925)\n- [MixPHP V3 发布前的感想, 有哪些变化和特点](https://zhuanlan.zhihu.com/p/392558932)\n\n## `AD` 混联网关\n\n[混联网关](https://connmix.com/) - 可编程分布式长连接网关\n\n- 可用于聊天室、直播弹幕、IM即时通讯、在线客服、网络游戏、硬件通讯、智能家居、物联网等领域的开发\n- 几行代码，免费搞定socket、websocket实时通讯\n\n## 技术交流\n\n知乎：https://www.zhihu.com/people/onanying    \n官方QQ群：[284806582](https://shang.qq.com/wpa/qunwpa?idkey=b3a8618d3977cda4fed2363a666b081a31d89e3d31ab164497f53b72cf49968a), [825122875](http://shang.qq.com/wpa/qunwpa?idkey=d2908b0c7095fc7ec63a2391fa4b39a8c5cb16952f6cfc3f2ce4c9726edeaf20) 敲门暗号：phper\n\n## Golang 框架\n\nOpenMix 同时还有 Golang 生态的框架\n\n- https://github.com/mix-go/mix\n- https://gitee.com/mix-go/mix\n\n## License\n\nApache License Version 2.0, http://www.apache.org/licenses/\n","funding_links":[],"categories":["目录","框架( Frameworks )","Framework"],"sub_categories":["框架 frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixstart%2Fmixphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmixstart%2Fmixphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmixstart%2Fmixphp/lists"}