PHPackages                             smskin/laravel-daemon-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. [Queues &amp; Workers](/categories/queues)
4. /
5. smskin/laravel-daemon-supervisor

ActiveLibrary[Queues &amp; Workers](/categories/queues)

smskin/laravel-daemon-supervisor
================================

Daemon supervisor engine for laravel projects

1.0.2(1y ago)01.2k[1 PRs](https://github.com/smskin/laravel-daemon-supervisor/pulls)1MITPHPPHP ^8.1CI passing

Since May 28Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/smskin/laravel-daemon-supervisor)[ Packagist](https://packagist.org/packages/smskin/laravel-daemon-supervisor)[ RSS](/packages/smskin-laravel-daemon-supervisor/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (6)Versions (5)Used By (1)

Basic Library for Implementing Child Processes in Laravel
=========================================================

[](#basic-library-for-implementing-child-processes-in-laravel)

The idea for this library originated from studying the source code of [Laravel Horizon](https://laravel.com/docs/11.x/horizon).

Horizon starts a master process that spawns child processes to execute tasks from queues.

How It Works
------------

[](#how-it-works)

We start a master process (`supervisor`), which spawns and manages child processes (`worker`).

The master process is subscribed to [PCNTL](https://www.php.net/manual/ru/intro.pcntl.php) signals. Upon receiving a signal, it first terminates the child processes and then stops itself.

Usage
-----

[](#usage)

### Master Process (supervisor) - CLI

[](#master-process-supervisor---cli)

The artisan command class for the supervisor should extend `SMSkin\LaravelSupervisor\Commands\SupervisorsCommand`.

In the class, you need to implement the method `protected function getWorkers(): Collection`, which returns a collection of worker process models (classes that implement the `SMSkin\LaravelSupervisor\Contracts\IWorker` interface).

You can find an example of an artisan command in `./src/Examples/TestSupervisorCommand.php`.

### Worker Process (worker) - CLI

[](#worker-process-worker---cli)

The artisan command class for the worker should extend `SMSkin\LaravelSupervisor\Commands\WorkerCommand`.

In the class, you need to implement two methods:

- `public function getSubscribedSignals(): array` - an array of PCNTL signals that this process listens for.
- `public function handleSignal(int $signal, false|int $previousExitCode = 0): int|false` - a method called when a PCNTL signal is received.
- You can find an example of an artisan command in `./src/Examples/TestWorkerCommand.php`.

### Worker Process Model

[](#worker-process-model)

The class should implement the `SMSkin\LaravelSupervisor\Contracts\IWorker interface`.

In the class, you need to implement the method `public function getArtisanCommand(): string`, which returns the artisan command corresponding to the worker process.

You can find an example class in `./src/Examples/TestWorker.php`.

Projects that use this library (for extended example):
------------------------------------------------------

[](#projects-that-use-this-library-for-extended-example)

- [smskin/laravel-rabbitmq](https://github.com/smskin/laravel-rabbitmq)
    - [Supervisor command](https://github.com/smskin/laravel-rabbitmq/blob/main/src/Commands/SupervisorCommand.php)
    - [Worker command](https://github.com/smskin/laravel-rabbitmq/blob/main/src/Commands/WorkerCommand.php)
    - [Worker model](https://github.com/smskin/laravel-rabbitmq/blob/main/src/Entities/Worker.php)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance49

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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 ~151 days

Total

3

Last Release

464d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3227797?v=4)[Sergey Mihaylov](/maintainers/smskin)[@smskin](https://github.com/smskin)

---

Top Contributors

[![smskin](https://avatars.githubusercontent.com/u/3227797?v=4)](https://github.com/smskin "smskin (14 commits)")

---

Tags

laraveldaemonsupervisormultithread

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/smskin-laravel-daemon-supervisor/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63825.7k1](/packages/mpbarlow-laravel-queue-debouncer)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[convenia/pigeon

3334.8k](/packages/convenia-pigeon)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3891.8k](/packages/codewithdennis-larament)

PHPackages © 2026

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