PHPackages                             juliangut/server-handler-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. juliangut/server-handler-swoole

ActiveLibrary

juliangut/server-handler-swoole
===============================

Swoole with PSR-15

036PHPCI failing

Since Feb 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/juliangut/server-handler-swoole)[ Packagist](https://packagist.org/packages/juliangut/server-handler-swoole)[ RSS](/packages/juliangut-server-handler-swoole/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![PHP version](https://camo.githubusercontent.com/d0b5687c6812c5d52d86a548e09db527eeb7860f82adbb677de00a36ddbed1b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](http://php.net)[![Latest Version](https://camo.githubusercontent.com/85b0cb1f013dce5dff11968e060fe8bada8cd2165769952145e5dad71ce354c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juliangut/server-handler-swoole)[![License](https://camo.githubusercontent.com/dda5cf3efb0a990794d8d71641545c913e90e60a8b18c0dd050471372837321b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/juliangut/server-handler-swoole/blob/master/LICENSE)

[![Build Status](https://camo.githubusercontent.com/bd6768e990272bfdf694c41cfc3e51c0d81ec343e490f0ea4bc753ed35123e1d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/juliangut/server-handler-swoole)[![Style Check](https://camo.githubusercontent.com/6e8ad598de9061ae7d6b9093ae2aa6661a077a7750a0576eb5a0d966cf5bf740/68747470733a2f2f7374796c6563692e696f2f7265706f732f3233343733323435382f736869656c64)](https://styleci.io/repos/234732458)[![Code Quality](https://camo.githubusercontent.com/07375e137985ed9a5c90c420045262468d3e7a77ef4fcb3e8fa5ee63347ddd7b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/juliangut/server-handler-swoole)[![Code Coverage](https://camo.githubusercontent.com/e40376dd9da26e5a930088789b2bd7ed55a02d0ccfed712c86607dacee26f455/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/juliangut/server-handler-swoole)

[![Total Downloads](https://camo.githubusercontent.com/2df81527565a6dd66c9f742ec38b939225ccedef3dc4a4ada1ffe0690ddf28ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juliangut/server-handler-swoole/stats)[![Monthly Downloads](https://camo.githubusercontent.com/b9be81e375c389cf13a61b2b971bec361c76ed7d12431b9f403e7732ddf66165/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a756c69616e6775742f7365727665722d68616e646c65722d73776f6f6c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juliangut/server-handler-swoole/stats)

juliangut/server-handler-swoole
===============================

[](#juliangutserver-handler-swoole)

Easily run Swoole server with any implementation of PSR-15 RequestHandlerInterface

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require juliangut/server-handler-swoole

```

Usage
-----

[](#usage)

Require composer autoload file

```
require './vendor/autoload.php';

use Jgut\ServerHandler\Swoole\Http\PsrRequestFactory;
use Jgut\ServerHandler\Swoole\Http\SwooleResponseFactory;
use Swoole\Http\Server as SwooleServer;

$swooleServer = new SwooleServer('127.0.0.1', 8080, \SWOOLE_BASE, \SWOOLE_SOCK_TCP);
$swooleServer->set([
    'max_conn' => 1024,
    'enable_coroutine' => false,
]);

$requestFactory = new PsrRequestFactory(
    /* \Psr\Http\Message\ServerRequestFactoryInterface */,
    /* \Psr\Http\Message\UriFactoryInterface */,
    /* \Psr\Http\Message\StreamFactoryInterface */,
    /* \Psr\Http\Message\UploadedFileFactoryInterface */
);
$responseFactory = new SwooleResponseFactory();

$server = new Server(
    $swooleServer,
    /* Psr\Http\Server\RequestHandlerInterface */,
    $requestFactory,
    $responseFactory,
    true
);

$server->run();
```

Contributing
------------

[](#contributing)

Found a bug or have a feature request? [Please open a new issue](https://github.com/juliangut/server-handler-swoole/issues). Have a look at existing issues before.

See file [CONTRIBUTING.md](https://github.com/juliangut/server-handler-swoole/blob/master/CONTRIBUTING.md)

License
-------

[](#license)

See file [LICENSE](https://github.com/juliangut/server-handler-swoole/blob/master/LICENSE) included with the source code for a copy of the license terms.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c50421f1ab4148354dc2dd5dcaba168656b17ea913b310d112deb39a6f73ca1?d=identicon)[juliangut](/maintainers/juliangut)

---

Top Contributors

[![juliangut](https://avatars.githubusercontent.com/u/1104131?v=4)](https://github.com/juliangut "juliangut (21 commits)")

### Embed Badge

![Health badge](/badges/juliangut-server-handler-swoole/health.svg)

```
[![Health](https://phpackages.com/badges/juliangut-server-handler-swoole/health.svg)](https://phpackages.com/packages/juliangut-server-handler-swoole)
```

PHPackages © 2026

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