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)41271[3 issues](https://github.com/skoro/slim-swoole-integration/issues)[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 1w 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

22

—

LowBetter than 21% of packages

Maintenance5

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

1690d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6389201?v=4)[Oleksii Skorobogatko](/maintainers/skoro)[@skoro](https://github.com/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.8k191.4k57](/packages/easyswoole-easyswoole)[easyswoole/mysqli

An efficient swoole framework

34125.6k36](/packages/easyswoole-mysqli)[easyswoole/orm

php stander lib

3291.5k29](/packages/easyswoole-orm)[easyswoole/compiler

easyswoole component

691.4k](/packages/easyswoole-compiler)[easyswoole/actor

easyswoole component

1410.4k](/packages/easyswoole-actor)

PHPackages © 2026

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