PHPackages                             skoro/slim-swoole-integration - 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. skoro/slim-swoole-integration

ActiveLibrary[Framework](/categories/framework)

skoro/slim-swoole-integration
=============================

Integration of Slim framework and Swoole - event driven asynchronous library

0.1.1(4y ago)41171[1 PRs](https://github.com/skoro/slim-swoole-integration/pulls)MITPHPPHP ^8.0

Since Dec 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/skoro/slim-swoole-integration)[ Packagist](https://packagist.org/packages/skoro/slim-swoole-integration)[ RSS](/packages/skoro-slim-swoole-integration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Integration of Slim Framework and Swoole
----------------------------------------

[](#integration-of-slim-framework-and-swoole)

This package provides an integration of [Slim Framework](https://www.slimframework.com/)and event-based async [Swoole](https://github.com/swoole/swoole-src) library.

Install from composer:

```
composer require skoro/slim-swoole-integration
```

Example (`server.php`):

```
$server = new \Swoole\Http\Server('localhost', 9501);
$app = \Slim\Factory\AppFactory::create();

$app->get('/', function (\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response) {
    $response->getBody()->write('Hello');
    return $response;
});

$server->on('request', \Slim\Swoole\ServerRequestFactory::createRequestCallback($app));

$server->start();
```

After starting above server with `php server.php` command it will be listening on `localhost` and `9501` port.

### Hot code reloading

[](#hot-code-reloading)

Because Swoole works in a different way than PHP-FPM it doesn't reload the sources you changed between the requests as it PHP-FPM does. When you changed the sources you have to restart the server to apply your source changes and that can become annoying.

This library provides automatic server reloading depending on the file system changes, but it relies on PHP pecl `inotify` extension, and it should be installed first.

Please keep in mind, Swoole cannot handle included PHP files before `WorkerStart`event: .

Example:

```
// $server is created in the above example.
$server->on('start', function ($server) {
    $watcher = new \Slim\Swoole\FileWatchers\InotifyWatcher();
    $watcher->addFilePath('path to your project sources');

    // Reloader tracks the changes every 1000 ms.
    $reloader = new \Slim\Swoole\HotCodeReloader($watcher, $server, 1000);
    $reloader->start();
});
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

1593d ago

### Community

Maintainers

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

---

Top Contributors

[![skoro](https://avatars.githubusercontent.com/u/6389201?v=4)](https://github.com/skoro "skoro (9 commits)")

---

Tags

phpslim-frameworkswooleasyncframeworkslimevent-drivenswoole

### Embed Badge

![Health badge](/badges/skoro-slim-swoole-integration/health.svg)

```
[![Health](https://phpackages.com/badges/skoro-slim-swoole-integration/health.svg)](https://phpackages.com/packages/skoro-slim-swoole-integration)
```

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

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

An efficient swoole framework

34120.5k27](/packages/easyswoole-mysqli)[easyswoole/orm

php stander lib

3088.7k17](/packages/easyswoole-orm)[easyswoole/compiler

easyswoole component

691.1k](/packages/easyswoole-compiler)[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)
