PHPackages                             supervisorphp/event - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. supervisorphp/event

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

supervisorphp/event
===================

Listen to Supervisor events in PHP

v0.2.0(5y ago)1442.4k↓36.5%2MITPHPPHP &gt;=7.3CI failing

Since Jan 13Pushed 3y ago3 watchersCompare

[ Source](https://github.com/supervisorphp/event)[ Packagist](https://packagist.org/packages/supervisorphp/event)[ Docs](http://supervisorphp.com)[ RSS](/packages/supervisorphp-event/feed)WikiDiscussions main Synced 1mo ago

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

Supervisor Event
================

[](#supervisor-event)

[![Latest Version](https://camo.githubusercontent.com/b6dcb93082a19baf293d895d508559b4f2fbbd06673c7f74bc5deaa64b10f1d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73757065727669736f727068702f6576656e742e737667)](https://github.com/supervisorphp/event/releases)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/97a702cc9de9722e2a3433cd9de1c04dd91248e86a2027e0a84040dc6e38cf3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73757065727669736f727068702f6576656e742e737667)](https://packagist.org/packages/supervisorphp/event)[![Test Suite](https://github.com/supervisorphp/event/workflows/Test%20Suite/badge.svg)](https://github.com/supervisorphp/event/actions)

**Listen to Supervisor events in PHP.**

Install
-------

[](#install)

Via Composer

```
$ composer require supervisorphp/event
```

Usage
-----

[](#usage)

Supervisor has this pretty good feature: notify you(r listener) about it's events.

The main entry point is the `Listener`. `Listeners`s wait for a `Handler` in the main listening logic. `Handler`s get a `Notification` when an event occurs.

```
$handler = new \Supervisor\Event\Handler\CallbackHandler(function(\Supervisor\Event\Notification $notification) {
	echo $notification->getHeader('eventname');
});

$listener = new \Supervisor\Event\Listener\StandardListener;
$listener->listen($handler);
```

Currently available listeners:

- Standard: Listents to standard input stream, writes to standard output
- Guzzle: Uses `StreamInterface` to provide an easy interface for reading/writting

Additionally you can use two exceptions to control the listeners itself:

- `Supervisor\Exception\StopListenerException`: indicates that the `Listener` should stop listening for further events.
- `Supervisor\Exception\EventHandlingFailedException`: indicates that handling the event failed, `Listener` should return with a FAIL response.

Any other unhandled exceptions/errors will cause the listener to stop.

Check the Supervisor docs for more about [Events](http://supervisord.org/events.html).

Testing
-------

[](#testing)

```
phpspec run
```

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Márk Sági-Kazár](https://github.com/sagikazarmark)
- [All Contributors](https://github.com/supervisorphp/event/contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~2000 days

Total

2

Last Release

2143d ago

PHP version history (2 changes)v0.1.0PHP &gt;=5.4.0

v0.2.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e4e105cea62b616d4cb376b08a849b6a428f646998537de150d16a8eb537b90?d=identicon)[mark.sagikazar](/maintainers/mark.sagikazar)

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

---

Top Contributors

[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (28 commits)")[![BusterNeece](https://avatars.githubusercontent.com/u/6744885?v=4)](https://github.com/BusterNeece "BusterNeece (3 commits)")[![kocoten1992](https://avatars.githubusercontent.com/u/7130705?v=4)](https://github.com/kocoten1992 "kocoten1992 (1 commits)")

---

Tags

eventlistenersupervisor

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/supervisorphp-event/health.svg)

```
[![Health](https://phpackages.com/badges/supervisorphp-event/health.svg)](https://phpackages.com/packages/supervisorphp-event)
```

###  Alternatives

[league/event

Event package

1.6k141.6M184](/packages/league-event)[mtdowling/supervisor-event

Wires callback functions to Supervisor events

123174.8k1](/packages/mtdowling-supervisor-event)

PHPackages © 2026

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