PHPackages                             ennm/http - 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. ennm/http

ActiveLibrary[Framework](/categories/framework)

ennm/http
=========

An efficient swoole framework

1.2.51(7y ago)0251Apache-2.0PHPPHP &gt;=7.1.0

Since May 25Pushed 7y agoCompare

[ Source](https://github.com/ennm/http)[ Packagist](https://packagist.org/packages/ennm/http)[ Docs](https://www.easyswoole.com/)[ RSS](/packages/ennm-http/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (6)Versions (29)Used By (1)

EasySwoole HTTP 服务组件
====================

[](#easyswoole-http-服务组件)

一个轻量级的HTTP Dispatch组件

Server Script
-------------

[](#server-script)

```
require 'vendor/autoload.php';
$http = new swoole_http_server("0.0.0.0", 9501);
$http->set([
    'worker_num'=>1
]);

$http->on("start", function ($server) {
    echo "Swoole http server is started at http://127.0.0.1:9501\n";
});

$service = new \EasySwoole\Http\WebService();
$service->setExceptionHandler(function (\Throwable $throwable,\EasySwoole\Http\Request $request,\EasySwoole\Http\Response $response){
    $response->write('error:'.$throwable->getMessage());
});

$http->on("request", function ($request, $response)use($service) {
    $req = new \EasySwoole\Http\Request($request);
    $service->onRequest($req,new \EasySwoole\Http\Response($response));
});

$http->start();

```

Controller Folder
-----------------

[](#controller-folder)

```
namespace App\HttpController;

use EasySwoole\Http\AbstractInterface\Controller;

class Index extends Controller
{

    function index()
    {
        // TODO: Implement index() method
        $this->response()->write('hello world');
    }

    function actionNotFound($action): void
    {
        $this->response()->write("{$action} not found");
    }

    function testSession()
    {
        $this->session()->start();
        $this->session()->set('a',1);
        $this->session()->writeClose();
    }

    function testSession2()
    {
        $this->session()->start();
        $this->response()->write($this->session()->get('a'));
    }

    function testException()
    {
        new NoneClass();
    }

    protected function onException(\Throwable $throwable): void
    {
        $this->response()->write($throwable->getMessage());
    }

    protected function gc()
    {
        parent::gc();
        var_dump('class :'.static::class.' is recycle to pool');
    }
}

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 81.6% 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 ~7 days

Total

28

Last Release

2698d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2a3d406b8dd7fe784be379f7b9fcda12538674fa7f0a61ce37addd72df0ed21?d=identicon)[xingyong](/maintainers/xingyong)

---

Top Contributors

[![kiss291323003](https://avatars.githubusercontent.com/u/24490609?v=4)](https://github.com/kiss291323003 "kiss291323003 (40 commits)")[![evalor](https://avatars.githubusercontent.com/u/26944445?v=4)](https://github.com/evalor "evalor (4 commits)")[![yyougg](https://avatars.githubusercontent.com/u/31879111?v=4)](https://github.com/yyougg "yyougg (3 commits)")[![pppscn](https://avatars.githubusercontent.com/u/5105854?v=4)](https://github.com/pppscn "pppscn (1 commits)")[![tioncico](https://avatars.githubusercontent.com/u/31308307?v=4)](https://github.com/tioncico "tioncico (1 commits)")

---

Tags

asyncframeworkswooleeasyswoole

### Embed Badge

![Health badge](/badges/ennm-http/health.svg)

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

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

4.8k186.9k50](/packages/easyswoole-easyswoole)[easyswoole/rpc

An efficient swoole framework

7731.6k2](/packages/easyswoole-rpc)[easyswoole/kafka

An efficient swoole framework

4211.1k](/packages/easyswoole-kafka)[easyswoole/orm

php stander lib

3088.7k17](/packages/easyswoole-orm)[easyswoole/fast-cache

An efficient swoole framework

1030.3k2](/packages/easyswoole-fast-cache)[easyswoole/actor

easyswoole component

1410.3k](/packages/easyswoole-actor)

PHPackages © 2026

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