PHPackages                             catalyst/swoole-foundation - 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. catalyst/swoole-foundation

ActiveLibrary

catalyst/swoole-foundation
==========================

Catalyst Swoole Foundation

v0.1.1(9y ago)43MITPHPPHP &gt;=7.0

Since Jan 28Pushed 9y ago2 watchersCompare

[ Source](https://github.com/CatalystCollective/SwooleFoundation)[ Packagist](https://packagist.org/packages/catalyst/swoole-foundation)[ RSS](/packages/catalyst-swoole-foundation/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

SwooleFoundation
================

[](#swoolefoundation)

Swoole Foundation Library

### What is the Swoole Foundation

[](#what-is-the-swoole-foundation)

The swoole foundation is a factory foundation to easily create swoole server instances. The orchestration of settings and events is closure based.

### Dependencies

[](#dependencies)

This Package depends on `catalyst/servant`.

### Creating a Swoole Server

[](#creating-a-swoole-server)

```
use Catalyst\Swoole\{
    ServerFactory,
    Entities\ServerEvents,
    Entities\ServerConfiguration
};

$factory = new ServerFactory();

$server = $factory->server(function(ServerConfiguration $settings, ServerEvents $events) {
    $settings->withBinding('::', 9508);

    $events->onStart(function() {
        echo 'Server started!';
    });
});
```

### Creating a Swoole Http Server

[](#creating-a-swoole-http-server)

```
use Catalyst\Swoole\{
    ServerFactory,
    Entities\HttpServerEvents,
    Entities\ServerConfiguration
};

$factory = new ServerFactory();

$server = $factory->httpServer(function(ServerConfiguration $settings, HttpServerEvents $events) {
    $settings->withBinding('::', 80);

    $events->onRequest(function(swoole_http_request $request, swoole_http_respose $response) {
        $response->end('Hello World!');
    });
});
```

### Creating a Swoole Websocket Server

[](#creating-a-swoole-websocket-server)

```
use Catalyst\Swoole\{
    ServerFactory,
    Entities\HttpServerEvents,
    Entities\ServerConfiguration
};

$factory = new ServerFactory();

$server = $factory->webSocketServer(function(ServerConfiguration $settings, HttpServerEvents $events) {
    $settings->withBinding('::', 80);

    $events->onRequest(function(swoole_http_request $request, swoole_http_respose $response) {
        $response->end('Hello World!');
    });
});
```

### Servant awareness

[](#servant-awareness)

The Factory implementation is servant aware and allows to chain additional servants to the given servants. Due to implementation decisions, you can not replace the first servant. An exception will be thrown when you try to set a different servant.

### License and Maintainer(s)

[](#license-and-maintainers)

This package is licensed under the MIT license. This package is actively maintained by:

- Matthias Kaschubowski

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

3390d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/227851c0e1b423c7d7e6500c5ee45ff9911bbe1c53fff67b011fb055b9eeed43?d=identicon)[nihylum](/maintainers/nihylum)

---

Top Contributors

[![nhlm](https://avatars.githubusercontent.com/u/23406211?v=4)](https://github.com/nhlm "nhlm (6 commits)")

### Embed Badge

![Health badge](/badges/catalyst-swoole-foundation/health.svg)

```
[![Health](https://phpackages.com/badges/catalyst-swoole-foundation/health.svg)](https://phpackages.com/packages/catalyst-swoole-foundation)
```

PHPackages © 2026

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