PHPackages                             swoft-fork/swoft - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. swoft-fork/swoft

ActiveProject[Framework](/categories/framework)

swoft-fork/swoft
================

Modern High performance AOP and Coroutine PHP Framework

v2.1.0(11mo ago)01Apache-2.0PHPPHP &gt;8.0

Since Jun 5Pushed 11mo agoCompare

[ Source](https://github.com/sky-up/swoft)[ Packagist](https://packagist.org/packages/swoft-fork/swoft)[ RSS](/packages/swoft-fork-swoft/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (23)Versions (2)Used By (0)

[![swoft-logo](https://raw.githubusercontent.com/swoft-cloud/swoft/master/public/image/swoft-logo-mdl.png)](https://raw.githubusercontent.com/swoft-cloud/swoft/master/public/image/swoft-logo-mdl.png)

[![Latest Stable Version](https://camo.githubusercontent.com/a92797d4b3a6381d3cb36cbb4772101aeb94747f7d2799159cb2e2d5ef751f17/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f73776f66742e737667)](https://packagist.org/packages/swoft-fork/swoft)[![Build Status](https://camo.githubusercontent.com/e304d836e9fd2b03a61cc3b6d8cefc60100cf67d7cf1773cf8c080d694f6d6e3/68747470733a2f2f7472617669732d63692e6f72672f73776f66742d636c6f75642f73776f66742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/swoft-cloud/swoft)[![Docker Build Status](https://camo.githubusercontent.com/129c028f6d78e9fdbfa53c6126ff58ad26043542002a1a1fb8fcd1db6cddb3b1/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f6275696c642f73776f66742f616c7068702e737667)](https://hub.docker.com/r/swoft/swoft/)[![Php Version](https://camo.githubusercontent.com/3fe2b00a3b57acdbf9c6ee0890609712713224e8b654eff0d23e4a0ae3969828/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e302d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://secure.php.net/)[![Swoole Version](https://camo.githubusercontent.com/564f71187a5d2961c75fa5b3c9c5c3c0d13e3d0b544426f5f89e954b5d45ff88/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73776f6f6c652d2533453d342e342e312d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://github.com/swoole/swoole-src)[![Swoft Doc](https://camo.githubusercontent.com/ea1431167b522b88916c717b0bfe6348328a8662a684bb128f0b0bd6d22a20d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d70617373696e672d677265656e2e7376673f6d61784167653d32353932303030)](https://www.swoft.org/docs)[![Swoft License](https://camo.githubusercontent.com/1c419f89412ea6c234c184ad6d85decb127c18584858d3707ae7d8e2131eccc4/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f6c2f706c75672e7376673f6d61784167653d32353932303030)](https://github.com/swoft-cloud/swoft/blob/master/LICENSE)[![Gitter](https://camo.githubusercontent.com/dcb15bff10f33e3311d5d04605d572ecbeb99692f15d387e15a70ab2df3227e1/68747470733a2f2f696d672e736869656c64732e696f2f6769747465722f726f6f6d2f73776f66742d636c6f75642f73776f66742e737667)](https://gitter.im/swoft-cloud/community)

[![start-http-server](https://raw.githubusercontent.com/swoft-cloud/swoft/master/public/image/start-http-server.jpg)](https://raw.githubusercontent.com/swoft-cloud/swoft/master/public/image/start-http-server.jpg)

PHP microservice coroutine framework

**notice:**

This repository is forked from the Swoft repository on GitHub and has only been tested with Swoole version 4.8.13 and the corresponding PHP 8.2 environment. Please use with caution in your production environment, as active code maintenance is not guaranteed. For documentation, please refer to the original framework documentation.

> **[中文说明](README.zh-CN.md)**

Introduction
------------

[](#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
-------

[](#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 &amp; discovery
- Service breaker
- Service restrictions
- Service fallback
- Configuration Center
- Apollo
- Consul

Document
--------

[](#document)

- [中文文档](https://www.swoft.org/docs)
- [English](http://swoft.io/docs)

Discuss
-------

[](#discuss)

- Forum
- Gitter.im
- Reddit
- QQ Group3: 541038173
- QQ Group2: 778656850(full)
- QQ Group1: 548173319(full)

Requirement
-----------

[](#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
-------

[](#install)

### Composer

[](#composer)

```
composer create-project swoft-fork/swoft swoft
```

Start
-----

[](#start)

- Http Server

```
[root@swoft swoft]# php bin/swoft http:start
```

- WebSocket Server

```
[root@swoft swoft]# php bin/swoft ws:start
```

- RPC Server

```
[root@swoft swoft]# php bin/swoft rpc:start
```

- TCP Server

```
[root@swoft swoft]# php bin/swoft tcp:start
```

- Process Pool

```
[root@swoft swoft]# php bin/swoft process:start
```

Core Components
---------------

[](#core-components)

Component NamePackagist Versionswoft-annotation[![Latest Stable Version](https://camo.githubusercontent.com/4d748d4338912169a874a25cba119662ef0273f3fb2e7c5ebf8650573be5926e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f616e6e6f746174696f6e2e737667)](https://packagist.org/packages/swoft-fork/annotation)swoft-config[![Latest Stable Version](https://camo.githubusercontent.com/836516ca44ddff77a93c78bbedf0ce88158e9c3cb5c2976c076ac93daf084040/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f636f6e6669672e737667)](https://packagist.org/packages/swoft-fork/config)swoft-db[![Latest Stable Version](https://camo.githubusercontent.com/7ca8f41156d61ca21d65a72446399f2a12646fc4284010f6c5671f83c1e6cc4e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f64622e737667)](https://packagist.org/packages/swoft-fork/db)swoft-framework[![Latest Stable Version](https://camo.githubusercontent.com/86b44d1bea0aec0f6aa53d0c9d8fc6c7842ba5874dce32d38e9a57218d095c20/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6672616d65776f726b2e737667)](https://packagist.org/packages/swoft-fork/framework)swoft-i18n[![Latest Stable Version](https://camo.githubusercontent.com/abbbd4ba6f1d3735ef463b2490a9f0615fb0d8d589a84853edf6db4da553c44d/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6931386e2e737667)](https://packagist.org/packages/swoft-fork/i18n)swoft-proxy[![Latest Stable Version](https://camo.githubusercontent.com/159475eec36811c07f4136322d6acf6c269f5b124d67920ac8b3fdff021148b7/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f70726f78792e737667)](https://packagist.org/packages/swoft-fork/proxy)swoft-rpc-client[![Latest Stable Version](https://camo.githubusercontent.com/91238ede746220668db7f5dc8c77d8b1a494d191cf03351e63db53db75e75c63/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7270632d636c69656e742e737667)](https://packagist.org/packages/swoft-fork/rpc-client)swoft-stdlib[![Latest Stable Version](https://camo.githubusercontent.com/58eafabacf4d7b64b19f5bcdbc774d2b3d5dd1dff88938884dfe628d33bf4272/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7374646c69622e737667)](https://packagist.org/packages/swoft-fork/stdlib)swoft-tcp-server[![Latest Stable Version](https://camo.githubusercontent.com/d0242db3e4b58ffd1e3dbbdc490621f31a3c67e38b23dda6b72cf662022cf748/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7463702d7365727665722e737667)](https://packagist.org/packages/swoft-fork/tcp-server)swoft-aop[![Latest Stable Version](https://camo.githubusercontent.com/16d51110e0536ccfeb5c0f5eb943122997dbedee9f500c97a8cce02e962cfb98/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f616f702e737667)](https://packagist.org/packages/swoft-fork/aop)swoft-connection-pool[![Latest Stable Version](https://camo.githubusercontent.com/18e8d4cd7cb3d529a5f6df650e1caa24a3fe7e2a034ec94b1da9650af0c8ade5/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f636f6e6e656374696f6e2d706f6f6c2e737667)](https://packagist.org/packages/swoft-fork/connection-pool)swoft-error[![Latest Stable Version](https://camo.githubusercontent.com/745094796d8c90db4818a837e5c0359d669576ae8faa1cd8e329483c1cfe5d5e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6572726f722e737667)](https://packagist.org/packages/swoft-fork/error)swoft-http-message[![Latest Stable Version](https://camo.githubusercontent.com/42a1da39b0529baa1eeaf0d72ca83ad206f9c2c5613265b94a82fcede3b717c1/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f687474702d6d6573736167652e737667)](https://packagist.org/packages/swoft-fork/http-message)swoft-log[![Latest Stable Version](https://camo.githubusercontent.com/a5b8201bdeb3bd78452b71ece6598f207b248c9e3c0d886a4dd9dfafa5b818bc/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6c6f672e737667)](https://packagist.org/packages/swoft-fork/log)swoft-redis[![Latest Stable Version](https://camo.githubusercontent.com/189afbd5fa7ba330594043a2e1ec44e60fc98c8d0297269d5f590171d0b124d2/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f72656469732e737667)](https://packagist.org/packages/swoft-fork/redis)swoft-rpc-server[![Latest Stable Version](https://camo.githubusercontent.com/e8ca64f8c3194a8d95ea03b084f037dcdeb04ee8e034c3efc22550729916374a/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7270632d7365727665722e737667)](https://packagist.org/packages/swoft-fork/rpc-server)swoft-task[![Latest Stable Version](https://camo.githubusercontent.com/6e8d633b9ee02a4de05a797f2d96f26311aa83f785631519f4b3f1c71a0718eb/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7461736b2e737667)](https://packagist.org/packages/swoft-fork/task)swoft-validator[![Latest Stable Version](https://camo.githubusercontent.com/e487d614bb4049a0e877340c6a7c969eabad9207cc5f05b8977dad10c67a0911/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f76616c696461746f722e737667)](https://packagist.org/packages/swoft-fork/validator)swoft-bean[![Latest Stable Version](https://camo.githubusercontent.com/c48be319897268aad0b4c499ba298b65b19c41b95dcf50b3ee7b887df4b8b843/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6265616e2e737667)](https://packagist.org/packages/swoft-fork/bean)swoft-console[![Latest Stable Version](https://camo.githubusercontent.com/520412fb426e5f827088edd5f9f64deab42fb23c6128c618cfb9e2544c79f804/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f636f6e736f6c652e737667)](https://packagist.org/packages/swoft-fork/console)swoft-event[![Latest Stable Version](https://camo.githubusercontent.com/6af5d3ffa97505038f0aadcbb88178164383b6ae7ea4a7985903544c3415e340/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6576656e742e737667)](https://packagist.org/packages/swoft-fork/event)swoft-http-server[![Latest Stable Version](https://camo.githubusercontent.com/d41e79421e8a1b6a88543ab816b3b809288def0481fd2b1817d4223ac0267f25/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f687474702d7365727665722e737667)](https://packagist.org/packages/swoft-fork/http-server)swoft-process[![Latest Stable Version](https://camo.githubusercontent.com/8d17012b3617e99d4dd714a9612f8d35cb553c9a229a466bca2f59e00fd1fe1f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f70726f636573732e737667)](https://packagist.org/packages/swoft-fork/process)swoft-rpc[![Latest Stable Version](https://camo.githubusercontent.com/e390e0967d011247c1f0a9b888824ba04b8aabd8af47ada7487aa20a5022c546/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7270632e737667)](https://packagist.org/packages/swoft-fork/rpc)swoft-server[![Latest Stable Version](https://camo.githubusercontent.com/cf85f753e44a4bad69fdea0d6cc0980346855991f9f56d2a49a30ad1b81e1cef/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7365727665722e737667)](https://packagist.org/packages/swoft-fork/server)swoft-tcp[![Latest Stable Version](https://camo.githubusercontent.com/390452f79e37e344d60d1ba7077ab0f7eff959f435f69a2c78a070d4de4cee65/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f7463702e737667)](https://packagist.org/packages/swoft-fork/tcp)swoft-websocket-server[![Latest Stable Version](https://camo.githubusercontent.com/4593320d62e2f9687df2ab9be6dbdcde57fbe64aa10027669cba6361866cdb58/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f776562736f636b65742d7365727665722e737667)](https://packagist.org/packages/swoft-fork/websocket-server)Extension Components
--------------------

[](#extension-components)

Component NamePackagist Versionswoft-apollo[![Latest Stable Version](https://camo.githubusercontent.com/46cb37a2044a0c4021e4355ca3f8190117761a49b18de9d40848935e8f14a526/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f61706f6c6c6f2e737667)](https://packagist.org/packages/swoft-fork/apollo)swoft-breaker[![Latest Stable Version](https://camo.githubusercontent.com/3ae53b4acf1b3d56b08296a313570917939ba66ac8b402073ca04a6da0ae183b/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f627265616b65722e737667)](https://packagist.org/packages/swoft-fork/breaker)swoft-crontab[![Latest Stable Version](https://camo.githubusercontent.com/323d2b96da7d78592b487c4e4cb43ecff1caaf150e5a808ee9fb22a4a689ffe0/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f63726f6e7461622e737667)](https://packagist.org/packages/swoft-fork/crontab)swoft-consul[![Latest Stable Version](https://camo.githubusercontent.com/f7aa5fb7f34be00af1b50f374e6ea0ae7475808060dc35482fd838e0a0ef3d16/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f636f6e73756c2e737667)](https://packagist.org/packages/swoft-fork/consul)swoft-limiter[![Latest Stable Version](https://camo.githubusercontent.com/4a6e3fa51f0d5fae7c20783d72711a248ca4acdd2ba816478e2860fd86aa084c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f6c696d697465722e737667)](https://packagist.org/packages/swoft-fork/limiter)swoft-view[![Latest Stable Version](https://camo.githubusercontent.com/d7f5fa4d82a73a114766098fa82cd75ef0c513b2b7a4858e443e101c7e78c549/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f766965772e737667)](https://packagist.org/packages/swoft-fork/view)swoft-whoops[![Latest Stable Version](https://camo.githubusercontent.com/5966362bad9a04d4a5a0a2de86a7a3831c1cae91dff8e6bb4fe903dfbe2951cf/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73776f66742f77686f6f70732e737667)](https://packagist.org/packages/swoft-fork/whoops)License
-------

[](#license)

Swoft is an open-source software licensed under the [LICENSE](LICENSE)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance51

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

348d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bba312fac5f0d799df9e229d514d470468541f1d3ea9c7fae33ab390d5692d14?d=identicon)[sky-up](/maintainers/sky-up)

---

Top Contributors

[![stelin](https://avatars.githubusercontent.com/u/1677543?v=4)](https://github.com/stelin "stelin (695 commits)")[![inhere](https://avatars.githubusercontent.com/u/5302062?v=4)](https://github.com/inhere "inhere (321 commits)")[![huangzhhui](https://avatars.githubusercontent.com/u/12077148?v=4)](https://github.com/huangzhhui "huangzhhui (159 commits)")[![whiteCcinn](https://avatars.githubusercontent.com/u/13690966?v=4)](https://github.com/whiteCcinn "whiteCcinn (26 commits)")[![sakuraovq](https://avatars.githubusercontent.com/u/30211214?v=4)](https://github.com/sakuraovq "sakuraovq (24 commits)")[![daydaygo](https://avatars.githubusercontent.com/u/3986303?v=4)](https://github.com/daydaygo "daydaygo (20 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (8 commits)")[![sky-up](https://avatars.githubusercontent.com/u/18524410?v=4)](https://github.com/sky-up "sky-up (5 commits)")[![linearregression](https://avatars.githubusercontent.com/u/3011346?v=4)](https://github.com/linearregression "linearregression (4 commits)")[![chunpat](https://avatars.githubusercontent.com/u/19848304?v=4)](https://github.com/chunpat "chunpat (4 commits)")[![panyongwei](https://avatars.githubusercontent.com/u/6112421?v=4)](https://github.com/panyongwei "panyongwei (4 commits)")[![wujunze](https://avatars.githubusercontent.com/u/12997869?v=4)](https://github.com/wujunze "wujunze (2 commits)")[![ChongmingDu](https://avatars.githubusercontent.com/u/22591706?v=4)](https://github.com/ChongmingDu "ChongmingDu (2 commits)")[![limingxinleo](https://avatars.githubusercontent.com/u/16648551?v=4)](https://github.com/limingxinleo "limingxinleo (2 commits)")[![twose](https://avatars.githubusercontent.com/u/25978241?v=4)](https://github.com/twose "twose (2 commits)")[![jjsty1e](https://avatars.githubusercontent.com/u/5469845?v=4)](https://github.com/jjsty1e "jjsty1e (1 commits)")[![alignwebs](https://avatars.githubusercontent.com/u/7644807?v=4)](https://github.com/alignwebs "alignwebs (1 commits)")[![doobas](https://avatars.githubusercontent.com/u/14978210?v=4)](https://github.com/doobas "doobas (1 commits)")[![minbaby](https://avatars.githubusercontent.com/u/3191858?v=4)](https://github.com/minbaby "minbaby (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

phpswooleswoft

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/swoft-fork-swoft/health.svg)

```
[![Health](https://phpackages.com/badges/swoft-fork-swoft/health.svg)](https://phpackages.com/packages/swoft-fork-swoft)
```

###  Alternatives

[swoft/framework

swoft framework component

64181.4k85](/packages/swoft-framework)[hyperf/hyperf-skeleton

A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.

301187.4k](/packages/hyperf-hyperf-skeleton)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
