# swoft **Repository Path**: jsonkaka/swoft ## Basic Information - **Project Name**: swoft - **Description**: 首个基于 Swoole 原生协程的新时代 PHP 高性能协程全栈框架,内置协程网络服务器及常用的协程客户端,常驻内存,不依赖传统的 PHP-FPM,全异步非阻塞 IO 实现,以类似于同步客户端的写法实现异步客户端的使用,没有复杂的异步回调,没有繁琐的 yield, 有类似 Go 语言的协程、灵活的注解、强大的全局依赖注入容器、完善的服务治理、灵活强大的 AOP、标准的 PSR 规范实现等等,可以用于构建高性能的Web系统、API、中间件、基础服务等等。 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://www.swoft.org/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 132 - **Created**: 2023-12-04 - **Last Updated**: 2023-12-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
[](https://packagist.org/packages/swoft/swoft) [](https://travis-ci.org/swoft-cloud/swoft) [](https://hub.docker.com/r/swoft/swoft/) [](https://secure.php.net/) [](https://github.com/swoole/swoole-src) [](https://www.swoft.org) [](https://github.com/swoft-cloud/swoft/blob/master/LICENSE) [](https://gitter.im/swoft-cloud/community)  PHP 高性能微服务协程框架 > **[EN README](README.md)** ## 简介 Swoft 是一款基于 Swoole 扩展实现的 PHP 微服务协程框架。Swoft 能像 Go 一样,内置协程网络服务器及常用的协程客户端且常驻内存,不依赖传统的 PHP-FPM。有类似 Go 语言的协程操作方式,有类似 Spring Cloud 框架灵活的注解、强大的全局依赖注入容器、完善的服务治理、灵活强大的 AOP、标准的 PSR 规范实现等等。 Swoft 通过长达三年的积累和方向的探索,把 Swoft 打造成 PHP 界的 Spring Cloud, 它是 PHP 高性能框架和微服务治理的最佳选择。 ## 功能特色 - 内置高性能网络服务器(Http/Websocket/RPC/TCP) - 灵活的组件功能 - 强大的注解功能 - 多样化的命令终端(控制台) - 强大的面向切面编程(AOP) - 容器管理,依赖注入(DI) - 灵活的事件机制 - 基于PSR-7的HTTP消息的实现 - 基于PSR-14的事件管理 - 基于PSR-15的中间件 - 国际化(i18n)支持 - 简单有效的参数验证器 - 高性能连接池(Mysql/Redis/RPC),自动重新连接 - 数据库高度兼容Laravel的使用方式 - Redis高度兼容Laravel的使用方式 - 秒级定时任务 - 进程池 - 高效的任务处理 - 灵活的异常处理 - 强大的日志系统 - 服务注册与发现 - 配置中心 - 服务限流 - 服务降级 - 服务熔断 - Apollo - Consul ## 在线文档 - [中文文档](https://www.swoft.org/documents/v2/index.html) - [English](http://swoft.io/docs/2.x/en) ## 学习交流 - QQ Group3: 541038173 - QQ Group2: 778656850(已满) - QQ Group1: 548173319(已满) - [swoft-cloud/community](https://gitter.im/swoft-cloud/community) ## 免费技术支持  ## Requirement - [PHP 7.1+](https://github.com/php/php-src/releases) - [Swoole 4.3.4+](https://github.com/swoole/swoole-src/releases) - [Composer](https://getcomposer.org/) ## Install ### Composer ```bash composer create-project swoft/swoft swoft ``` ## Start - Http server ```bash [root@swoft swoft]# php bin/swoft http:start ``` - WebSocket server ```bash [root@swoft swoft]# php bin/swoft ws:start ``` - RPC server ```bash [root@swoft swoft]# php bin/swoft rpc:start ``` ## 核心组件 Component Name | Packagist Version --------------------|--------------------- swoft-annotation | [](https://packagist.org/packages/swoft/annotation) swoft-config | [](https://packagist.org/packages/swoft/config) swoft-db | [](https://packagist.org/packages/swoft/db) swoft-framework | [](https://packagist.org/packages/swoft/framework) swoft-i18n | [](https://packagist.org/packages/swoft/i18n) swoft-proxy | [](https://packagist.org/packages/swoft/proxy) swoft-rpc-client | [](https://packagist.org/packages/swoft/rpc-client) swoft-stdlib | [](https://packagist.org/packages/swoft/stdlib) swoft-tcp-server | [](https://packagist.org/packages/swoft/tcp-server) swoft-aop | [](https://packagist.org/packages/swoft/aop) swoft-connection-pool | [](https://packagist.org/packages/swoft/connection-pool) swoft-error | [](https://packagist.org/packages/swoft/error) swoft-http-message | [](https://packagist.org/packages/swoft/http-message) swoft-log | [](https://packagist.org/packages/swoft/log) swoft-redis | [](https://packagist.org/packages/swoft/redis) swoft-rpc-server | [](https://packagist.org/packages/swoft/rpc-server) swoft-task | [](https://packagist.org/packages/swoft/task) swoft-validator | [](https://packagist.org/packages/swoft/validator) swoft-bean | [](https://packagist.org/packages/swoft/bean) swoft-console | [](https://packagist.org/packages/swoft/console) swoft-event | [](https://packagist.org/packages/swoft/event) swoft-http-server | [](https://packagist.org/packages/swoft/http-server) swoft-process | [](https://packagist.org/packages/swoft/process) swoft-rpc | [](https://packagist.org/packages/swoft/rpc) swoft-server | [](https://packagist.org/packages/swoft/server) swoft-tcp | [](https://packagist.org/packages/swoft/tcp) swoft-websocket-server | [](https://packagist.org/packages/swoft/websocket-server) ## 扩展组件 Component Name | Packagist Version -----------------|--------------------- swoft-apollo | [](https://packagist.org/packages/swoft/apollo) swoft-breaker | [](https://packagist.org/packages/swoft/breaker) swoft-cache | [](https://packagist.org/packages/swoft/cache) swoft-crontab | [](https://packagist.org/packages/swoft/crontab) swoft-consul | [](https://packagist.org/packages/swoft/consul) swoft-limiter | [](https://packagist.org/packages/swoft/limiter) swoft-view | [](https://packagist.org/packages/swoft/view) swoft-whoops | [](https://packagist.org/packages/swoft/whoops) swoft-session | [](https://packagist.org/packages/swoft/session) ## License Swoft is an open-source software licensed under the [LICENSE](LICENSE)