PHPackages                             scorpse/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. scorpse/supervisor

ActiveLibrary

scorpse/supervisor
==================

PHP library for managing Supervisor through XML-RPC API

v4.0.2(5y ago)010MITPHPPHP &gt;=7.4

Since Dec 16Pushed 5y agoCompare

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

READMEChangelog (2)Dependencies (13)Versions (20)Used By (0)

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:^6.0 php-http/guzzle6-adapter http-interop/http-factory-guzzle php-http/httplug php-http/message
```

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

```
// Create Guzzle 6 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\HttpAdapterTransport(
        new \Http\Message\MessageFactory\GuzzleMessageFactory(),
        new \Http\Adapter\Guzzle6\Client($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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~153 days

Recently: every ~52 days

Total

18

Last Release

1937d 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

PHP version history (5 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

v4.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/55ca8c105f8e6000e359a6ebc4da841d6c954423e3d8ef8076aa6322a3d25d9b?d=identicon)[scorpse](/maintainers/scorpse)

---

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 (13 commits)")[![prolic](https://avatars.githubusercontent.com/u/394428?v=4)](https://github.com/prolic "prolic (4 commits)")[![Scorpse](https://avatars.githubusercontent.com/u/51670?v=4)](https://github.com/Scorpse "Scorpse (2 commits)")[![gl3n](https://avatars.githubusercontent.com/u/965689?v=4)](https://github.com/gl3n "gl3n (1 commits)")[![raulp](https://avatars.githubusercontent.com/u/3310232?v=4)](https://github.com/raulp "raulp (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

supervisorprocess manager

###  Code Quality

TestsBehat

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[supervisorphp/supervisor

PHP library for managing Supervisor through XML-RPC API

2482.0M15](/packages/supervisorphp-supervisor)[api-platform/metadata

API Resource-oriented metadata attributes and factories

243.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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