PHPackages                             fresh-li/agile-swoole - 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. fresh-li/agile-swoole

ActiveLibrary[Framework](/categories/framework)

fresh-li/agile-swoole
=====================

A high-performance PHP development framework (using swoole)

v4.0(6y ago)10376MITPHPPHP ^7.0

Since Jan 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lwl1989/agileSwoole)[ Packagist](https://packagist.org/packages/fresh-li/agile-swoole)[ Docs](https://github.com/lwl1989/agileSwoole)[ RSS](/packages/fresh-li-agile-swoole/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (6)Used By (0)

关于Agile Swoole
==============

[](#关于agile-swoole)

一个高性能的PHP开发框架（swoole）

安装
--

[](#安装)

```
php 7.0+
swoole 4.0+
composer require fresh-li/agile-swoole:v4.0

```

特性
--

[](#特性)

```
    1. 支持MVC
    2. 支持自定义常驻进程
    3. 支持多种任务模式
    4. 路由自定义事件
    5. 简单易用orm[可二次开发，实现接口，自动注入即可]
    6. 支持yaf
    7. 全面支持psr container psr http-message psr autoloader
    8. 全协程任务

```

压力测试
----

[](#压力测试)

#### 测试机器

[](#测试机器)

#### 测试命令

[](#测试命令)

```
cd bin
php agile.php
ab -c 100 -n 50000 http://127.0.0.1:9550/welcome

```

#### 测试结果

[](#测试结果)

```

```

快速开始
----

[](#快速开始)

```
composer require fresh-li/agile-swoole:dev-master
cd bin
php agile.php

http://127.0.0.1:9550/welcome

```

路由
--

[](#路由)

```
    CONF_PATH/route.php
    [
        'path'          =>      '/',
        'dispatch'      =>      [\Controller\Welcome::class, 'index']
    ],
    [
        'path'          =>      '/sync',
        'dispatch'      =>      [\Controller\Sync::class, 'run'],
        'type'          =>      \Component\Producer\Producer::PRODUCER_SYNC
    ],
    [
        'path'          =>      '/process',
        'dispatch'      =>      [\Controller\Process::class, 'run'],
        'before'        =>      [\Controller\Process::class, 'before'],
        'after'         =>      [\Controller\Process::class, 'after'],
        'type'          =>      \Component\Producer\Producer::PRODUCER_PROCESS
    ]

    GET: localhost:9550
    hello world!

    GET: localhost:9550/sync
    sync start
    ... 10 seconds after
    sync over

    POST: localhost:9550/process
    this process berfore
        create process ......
    this process after

```

3种不同的触发模式
---------

[](#3种不同的触发模式)

```
    class Sync{
        public function index()
        {
            return 'ff';
        }
    }

    {"code":0,"response":"ff"}

    class Process{
            public function index()
            {
                return 'ff';
            }
    }
    {"code":0,"response":{"processId":"{$processId}"}}

    class Task{
            public function index()
            {
                return ff;
            }
    }
    {"code":0}

```

常驻内存任务,开启服务立马启用
---------------

[](#常驻内存任务开启服务立马启用)

```
    $serverProcess = new ServerProcess();
    $serverProcess->addProcess(function(){
        while(true){
            //do some things
        }
    });

```

支持yaf
-----

[](#支持yaf)

```

```

orm
---

[](#orm)

License
-------

[](#license)

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~216 days

Total

4

Last Release

2401d ago

Major Versions

v1.2 → v4.02019-10-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d6aca5e18ccc2cccffb69f021a05367f74d8c650e389b8e964c8f147341c252?d=identicon)[lwl1989](/maintainers/lwl1989)

---

Top Contributors

[![lwl1989](https://avatars.githubusercontent.com/u/13486464?v=4)](https://github.com/lwl1989 "lwl1989 (37 commits)")

---

Tags

frameworkperformanceswooleyaf

### Embed Badge

![Health badge](/badges/fresh-li-agile-swoole/health.svg)

```
[![Health](https://phpackages.com/badges/fresh-li-agile-swoole/health.svg)](https://phpackages.com/packages/fresh-li-agile-swoole)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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