PHPackages                             supervisorphp/supervisor - 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/supervisor

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

supervisorphp/supervisor
========================

PHP library for managing Supervisor through XML-RPC API

5.1.0(3y ago)2482.0M—2.6%24[2 issues](https://github.com/supervisorphp/supervisor/issues)15MITPHPPHP &gt;=8.1

Since Dec 16Pushed 1y ago9 watchersCompare

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

READMEChangelog (4)Dependencies (13)Versions (20)Used By (15)

Supervisor
==========

[](#supervisor)

[![Latest Version](https://camo.githubusercontent.com/028108b977c6673fa234f35469e506690af9ed0495fce3cefe3e69aab59acad5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73757065727669736f727068702f73757065727669736f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/supervisorphp/supervisor/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Test Suite](https://github.com/supervisorphp/supervisor/workflows/Test%20Suite/badge.svg?event=push)](https://github.com/supervisorphp/supervisor/actions)[![Total Downloads](https://camo.githubusercontent.com/0c9017087c64f9d389e76e68e86935b8ae6034646e52b516207e076f92bca91f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73757065727669736f727068702f73757065727669736f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/supervisorphp/supervisor)

**PHP library for managing Supervisor through XML-RPC API.**

Install
-------

[](#install)

Via Composer

```
composer require supervisorphp/supervisor
```

Usage
-----

[](#usage)

This library depends on the fast and powerful [fXmlRpc](https://github.com/lstrojny/fxmlrpc) library, which supports a number of adapters to use your preferred HTTP client to make connections.

In the example below, we will use the popular Guzzle HTTP client library.

This example requires some additional libraries to function. To include the necessary extra components, you can run:

```
composer require guzzlehttp/guzzle:^7.0
```

This example shows how to pass authentication credentials to Guzzle, initiate the fXmlRpc client, and pass that to SupervisorPHP.

```
// Create Guzzle HTTP client
$guzzleClient = new \GuzzleHttp\Client([
    'auth' => ['user', '123'],
]);

// Pass the url and the guzzle client to the fXmlRpc Client
$client = new fXmlRpc\Client(
    'http://127.0.0.1:9001/RPC2',
    new fXmlRpc\Transport\PsrTransport(
        new GuzzleHttp\Psr7\HttpFactory(),
        $guzzleClient
    )
);

// Or, if connecting via a Unix Domain Socket
$guzzleClient = new \GuzzleHttp\Client([
    'curl' => [
        \CURLOPT_UNIX_SOCKET_PATH => '/var/run/supervisor.sock',
    ],
]);

$client = new fXmlRpc\Client(
    'http://localhost/RPC2',
    new fXmlRpc\Transport\PsrTransport(
        new GuzzleHttp\Psr7\HttpFactory(),
        $guzzleClient
    )
);

// Pass the client to the Supervisor library.
$supervisor = new Supervisor\Supervisor($client);

// returns Process object
$process = $supervisor->getProcess('test_process');

// returns array of process info
$supervisor->getProcessInfo('test_process');

// same as $supervisor->stopProcess($process);
$supervisor->stopProcess('test_process');

// Don't wait for process start, return immediately
$supervisor->startProcess($process, false);

// returns true if running
// same as $process->checkState(Process::RUNNING);
$process->isRunning();

// returns process name
echo $process;

// returns process information
$process->getPayload();
```

### Exception handling

[](#exception-handling)

For each possible fault response there is an exception. These exceptions extend a [common exception](src/Exception/Fault.php), so you are able to catch a specific fault or all. When an unknown fault is returned from the server, an instance if the common exception is thrown. The list of fault responses and the appropriate exception can be found in the class.

```
/** @var \Supervisor\Supervisor $supervisor */

try {
	$supervisor->startProcess('process', true);
} catch (\Supervisor\Exception\Fault\BadNameException $e) {
	// handle bad name error here
} catch (\Supervisor\Exception\SupervisorException $e) {
	// handle any other errors here
}
```

Configuration and Event listening
---------------------------------

[](#configuration-and-event-listening)

[Configuration](https://github.com/supervisorphp/configuration) and [Event](https://github.com/supervisorphp/event) components have been moved into their own repository.

Further info
------------

[](#further-info)

You can find the Supervisor XML-RPC documentation here:

Notice
------

[](#notice)

If you use PHP XML-RPC extension to parse responses (which is marked as *EXPERIMENTAL*). This can cause issues when you are trying to read/tail log of a PROCESS. Make sure you clean your log messages. The only information I found about this is a [comment](http://www.php.net/function.xmlrpc-decode#44213).

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

[](#contributing)

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

### Testing

[](#testing)

```
$ composer test
```

Functional tests (behat):

```
$ behat
```

### Docker Image

[](#docker-image)

This repository ships with a Docker Compose configuration and a Dockerfile for easy testing. Tests can be run via:

```
docker-compose run --rm ci
```

Deprecated Libraries
--------------------

[](#deprecated-libraries)

While this tries to be a complete Supervisor client, this isn't the first one. However some authors decided to deprecate their packages in favor of this:

- [Supervisord PHP Client](https://github.com/mondalaci/supervisord-php-client)
- [Indigo Supervisor](https://github.com/indigophp/supervisor)

Credits
-------

[](#credits)

- [László Monda](https://github.com/mondalaci) (author of Supervisord PHP Client)
- [Márk Sági-Kazár](https://github.com/sagikazarmark)
- [All Contributors](https://github.com/supervisorphp/supervisor/contributors)

License
-------

[](#license)

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

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity58

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93% 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 ~192 days

Recently: every ~218 days

Total

18

Last Release

1274d ago

Major Versions

v1.2.1 → v2.0.02014-07-13

v2.0.2 → v3.0.0-alpha2014-10-07

v3.0.0 → v4.0.0-alpha2020-07-02

v4.0.0 → 5.0.02022-03-31

PHP version history (6 changes)v1.0.0PHP &gt;=5.3.3

v3.0.0-alphaPHP &gt;=5.4

v3.0.0-beta2PHP &gt;=5.4.0

v4.0.0-alphaPHP &gt;=7.3

5.0.0PHP &gt;=8.0

5.1.0PHP &gt;=8.1

### 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 (519 commits)")[![BusterNeece](https://avatars.githubusercontent.com/u/6744885?v=4)](https://github.com/BusterNeece "BusterNeece (31 commits)")[![prolic](https://avatars.githubusercontent.com/u/394428?v=4)](https://github.com/prolic "prolic (4 commits)")[![raulp](https://avatars.githubusercontent.com/u/3310232?v=4)](https://github.com/raulp "raulp (1 commits)")[![gl3n](https://avatars.githubusercontent.com/u/965689?v=4)](https://github.com/gl3n "gl3n (1 commits)")[![gabrielpra1](https://avatars.githubusercontent.com/u/19355306?v=4)](https://github.com/gabrielpra1 "gabrielpra1 (1 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (1 commits)")

---

Tags

hacktoberfestphpphp-librarysupervisorsupervisorprocess manager

###  Code Quality

TestsBehat

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[infusionsoft/php-sdk

PHP SDK for the Infusionsoft

1292.1M7](/packages/infusionsoft-php-sdk)[mtdowling/supervisor-event

Wires callback functions to Supervisor events

123174.8k1](/packages/mtdowling-supervisor-event)[supervisorphp/configuration

Manage Supervisor configuration in PHP

39589.8k4](/packages/supervisorphp-configuration)[graze/supervisor

:vertical\_traffic\_light: Process supervisor for PHP.

999.3k](/packages/graze-supervisor)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[supervisorphp/event

Listen to Supervisor events in PHP

1442.4k](/packages/supervisorphp-event)

PHPackages © 2026

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