PHPackages                             nigelgreenway/reactive-slim - 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. nigelgreenway/reactive-slim

ActiveLibrary[Framework](/categories/framework)

nigelgreenway/reactive-slim
===========================

A bridge to use SlimPHP within ReactPHP

v0.3.2(9y ago)295314[6 issues](https://github.com/NigelGreenway/reactive-slim/issues)[3 PRs](https://github.com/NigelGreenway/reactive-slim/pulls)PHPPHP ^7.0

Since May 16Pushed 3y ago3 watchersCompare

[ Source](https://github.com/NigelGreenway/reactive-slim)[ Packagist](https://packagist.org/packages/nigelgreenway/reactive-slim)[ RSS](/packages/nigelgreenway-reactive-slim/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (8)Versions (10)Used By (0)

[![Latest Version](https://camo.githubusercontent.com/7a3b30b57945184e01943e842a97afdefb33374df90b2b869419a3030b7d074e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4e6967656c477265656e7761792f72656163746976652d736c696d2e7376673f7374796c653d666c61742d737175617265)](https://github.com/NigelGreenway/reactive-slim/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/06d75ce0ea75f058cc304358bacdcc2460c994474555fbdc74acd08e3c9f9847/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4e6967656c477265656e7761792f72656163746976652d736c696d2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/NigelGreenway/reactive-slim)[![Total Downloads](https://camo.githubusercontent.com/f65a9ec6bd0fd57218b49900b8e9bd89842e7cced021d3753054f68a2c4c63c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4e6967656c477265656e7761792f72656163746976652d736c696d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/NigelGreenway/reactive-slim)

README
======

[](#readme)

Reactive Slim is a bridge where you can pass your [Slim](https://www.slimframework.com/) instance and reap the benefit's of [ReactPHP](http://reactphp.org/)'s event driven, non-blocking I/O usage of PHP.

The implementation run's on PHP7.0 and makes good use of PHP's [Scalar Type hints](http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration).

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

[](#installation)

`composer require nigelgreenway/reactive-slim`

Usage
-----

[](#usage)

After creating your [Slim Instance](https://www.slimframework.com/), pass it to the following construction:

```
(new \ReactiveSlim\Server($slimInstance))
    ->run();
```

*Please see the [examples](/example) for more information or run `php ./example/app-dev-mode.php`.*

If are you are running via PHP locally, you are able to pass the following flags to customise both the host and the port:

`-h 0.0.0.0` or `--host=0.0.0.0` and `-p 8686` or `--port=8686`

### Restarting your ReactApp

[](#restarting-your-reactapp)

There are 3 ways to restart your application (only tested on Linux - Solus, kernel 4.9.30-29.lts currently):

- `sh ./.tools/local-watch` runs via local PHP installation (requires `inotify-tools` to be installed via package manager)
- `sh ./.tools/reactor` run via local PHP installation and requires the `reactor.config.json` config
- `sh ./.tools/docker-watch` run the app within a Docker container (requires `inotify-tools` to be installed via package manager)

### Extra options

[](#extra-options)

`#withHost()` - The default host URL is `0.0.0.0` but is overridden by passing a string as the parameter

`#withPort()` - The default port is `1337` but is overridden by passing an integer as the parameter

`#withEnvironment()` - The default is `0` which is the `Production` environment, the full options are:

- `ServerEnvironment::PRODUCTION` (0)
- `ServerEnvironment::STAGING` (1)
- `ServerEnvironment::TESTING` (2)
- `ServerEnvironment::DEVELOPMENT` (3)

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nigel Greenway](http://github.com/NigelGreenway)
- [All Contributors](link-contributors)

This has been created to plug two great packages together:

- [SlimPHP](https://github.com/slimphp/Slim/graphs/contributors)
- [ReactPHP](https://github.com/reactphp/react/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

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

6

Last Release

3308d ago

### Community

Maintainers

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

---

Top Contributors

[![NigelGreenway](https://avatars.githubusercontent.com/u/2984008?v=4)](https://github.com/NigelGreenway "NigelGreenway (10 commits)")

---

Tags

event-loopphpphp-serverphp-webserverphp7reactphpreactphp-serverreactphp-slim-bridgeslim-bridgeslimphpslimphp-bridgephpevent-loopreactphpslimphpPHP7php-serverphp webserverslim bridgereactphp slim bridgeslimphp bridgereactphp server

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nigelgreenway-reactive-slim/health.svg)

```
[![Health](https://phpackages.com/badges/nigelgreenway-reactive-slim/health.svg)](https://phpackages.com/packages/nigelgreenway-reactive-slim)
```

###  Alternatives

[fuel/fuel

FuelPHP is a simple, flexible, community driven PHP 5.4+ framework, based on the best ideas of other frameworks, with a fresh start!

1.5k42.6k](/packages/fuel-fuel)[duxweb/dux-lite

The lightweight framework based on slim php

161.0k9](/packages/duxweb-dux-lite)

PHPackages © 2026

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