+0
Daily
5,531
stars
760
forks
220
watchers
282
prs
1,217
issues
26
releases
README
!swoft-logo !start-http-server PHP microservice coroutine framework 中文说明 Introduction Swoft is a PHP microservices coroutine framework based on the Swoole extension. Like Go, Swoft has a built-in coroutine web server and a common coroutine client and is resident in memory, independent of traditional PHP-FPM. There are similar Go language operations, similar to the Spring Cloud framework flexible annotations, powerful global dependency injection container, comprehensive service governance, flexible and powerful AOP, standard PSR specification implementation and so on. Through three years of accumulation and direction exploration, Swoft has made Swoft the Spring Cloud in the PHP world, which is the best choice for PHP's high-performance framework and microservices management. Feature - Built-in high performance network server(Http/Websocket/RPC/TCP) - Flexible componentization - Flexible annotation function - Diversified command terminal(Console) - Powerful Aspect Oriented Programming(AOP) - Perfect Container management, Dependency Injection (DI) - Flexible event mechanism - Implementation of HTTP message based on PSR-7 - Event Manager Based on PSR-14 - Middleware based on PSR-15 - Internationalization(i18n) support - Simple and efficient parameter validator - High performance connection pool(Mysql/Redis/RPC),Automatic reconnection - Database is highly compatible Laravel - Cache Redis highly compatible Laravel - Efficient task processing - Efficient seconds crontab - Process pool - Flexible exception handling - Powerful log system - Service registration & discovery - Service breaker - Service restrictions - Service fallback - Configuration Center - Apollo - Consul Document - 中文文档 - English Discuss - Forum https://github.com/swoft-cloud/forum/issues - Gitter.im https://gitter.im/swoft-cloud/community - Reddit https://www.reddit.com/r/swoft/ - QQ Group3: 541038173 - QQ Group2: 778656850(full) - QQ Group1: 548173319(full) Requirement - PHP 7.1+ - Swoole 4.3.4+ - Composer 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 - TCP Server bash [root@swoft swoft] php bin/swoft tcp:start - Process Pool bash [root@swoft swoft] php bin/swoft process:start Core Components Component Name | Packagist Version --------------------|--------------------- swoft-annotation | swoft-config | swoft-db | swoft-framework | swoft-i18n | swoft-proxy | swoft-rpc-client | swoft-stdlib | swoft-tcp-server | swoft-aop | swoft-connection-pool | swoft-error | swoft-http-message | swoft-log | swoft-redis
Top issues
#1313请求会有概率没反应,一直卡住,也没返回18 comments · 2020-06-15#1114Swoft 2.x DevTool Web UI 开发 功能、意见、收集。(Swoft 2.x DevTool Web UI development suggest to collect)13 comments · 2019-11-20#1088rpc 调用失败后,不走fallback8 comments · 2019-11-07#1389单元测试该怎么写,有没有详细一点的demo7 comments · 2020-11-05#1368PHP Fatal error: Swoole\Coroutine\Channel::isEmpty(): you must call Channel constructor first in /var/www/swoft/vendor/swoft/connection-pool/src/AbstractPool.php on line 198 [2020-09-18 13:48:53 @158.0] WARNING ~Channel (ERRNO 10003): channel is destroyed, 3 consumers will be discarded7 comments · 2020-09-18#1320请求量越多越会出现请求超时(进程处理超时)的情况。7 comments · 2020-06-22#1441RPC协议正式环境怎么样进行更新代码,而又不影响当前的请求6 comments · 2021-07-05#1296swoft模型查询数据问题6 comments · 2020-05-20
Discussions
#1429Code sample HTTP REST API + MySQL0 comments · 2021-05-09#1428v2.0.110 comments · 2021-05-08#1403Welcome to swoft Discussions!0 comments · 2020-12-09
Latest release
v2.0.11 v2.0.11 2021-05-08Change Log Fixed - fix type error on throw db exception https://github.com/swoft-cloud/swoft-component/commit/ee5814523fa505a576029f5e58edd88889b9e708 - fix: Redis::scan 方法 迭代值不返回问题修复 https://github.com/swoft-cloud/swoft-component/commit/e6b3304e2e412b9efd2b9bdc7a49d454dd90cf83 - fix. PDOException的code可能为字符串 https://github.com/swoft-cloud/swoft-component/commit/2e82980a4a770014fd99e6c13e67807c542da091 - fix: Class 'Swoole\Coroutine' not found https://github.com/swoft-cloud/swoft-component/commit/2340d5a10fd92354a1944a09a8f61a725ae228aa - fix. Redis释放连接时的内存泄漏 https://github.com/