PHPackages                             kafkiansky/signaler - 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. kafkiansky/signaler

ActiveLibrary

kafkiansky/signaler
===================

Signaler library that provide stack for signal listeners.

v0.1.0(4y ago)28MITPHPPHP &gt;=7.4

Since Mar 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kafkiansky/signaler)[ Packagist](https://packagist.org/packages/kafkiansky/signaler)[ RSS](/packages/kafkiansky-signaler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Stack Signaler.
===============

[](#stack-signaler)

[![test](https://github.com/kafkiansky/signaler/workflows/test/badge.svg?event=push)](https://github.com/kafkiansky/signaler/workflows/test/badge.svg?event=push)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/db83645aec132f4e3d4439afd1378de921a7f5174ef419be1fd328af3f44a372/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61666b69616e736b792f7369676e616c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kafkiansky/signaler)

### Contents

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
- [Testing](#testing)
- [License](#license)

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

[](#installation)

```
composer require kafkiansky/signaler
```

Usage
-----

[](#usage)

Simple example with `\SIGINT` signal.

```
use Kafkiansky\Signaler\SeldSignalFactory;
use Psr\Log\NullLogger;

$factory = new SeldSignalFactory(new NullLogger());

$signaler = $factory->subscribe([
    \SIGINT => function () use ($worker): void {
        $worker->stop();
    }
]);

while ($signaler->isTriggered() === false) {
    //
}
```

The main purpose of this library is to prevent the signal listener from being replaced by the `pcntl_signal` function if it was previously configured by vendor code. The library carefully saves previous signal listeners and will call them after yours.

In e.g.:

```
use Kafkiansky\Signaler\SeldSignalFactory;
use Psr\Log\NullLogger;

pcntl_signal(\SIGINT, function (): void {
    // This function will still be called after all your listeners.
});

$factory = new SeldSignalFactory(new NullLogger());

$signaler = $factory->subscribe([
    \SIGINT => function () use ($worker): void {
        $worker->stop();
    }
]);

while ($signaler->isTriggered() === false) {
    //
}
```

Testing
-------

[](#testing)

```
$ composer test
```

License
-------

[](#license)

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

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1509d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b0c87976a285325177559e27d154a9b5019466800c6a3342db916140c512ede?d=identicon)[kafkiansky](/maintainers/kafkiansky)

---

Top Contributors

[![kafkiansky](https://avatars.githubusercontent.com/u/37590388?v=4)](https://github.com/kafkiansky "kafkiansky (1 commits)")

---

Tags

signalunixposixsigintpcntl

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kafkiansky-signaler/health.svg)

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

###  Alternatives

[seld/signal-handler

Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development

18271.3M19](/packages/seld-signal-handler)[misterion/ko-process

Simple pcntl fork wrapper and process manager

177337.7k6](/packages/misterion-ko-process)[arara/process

Provides a better API to work with processes on Unix-like systems

16861.7k2](/packages/arara-process)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)[phlib/console-process

Console implementation.

1833.5k2](/packages/phlib-console-process)[misterion/ko-worker

Ko-worker project is a base to develop amqp based message dispatchers

2713.4k](/packages/misterion-ko-worker)

PHPackages © 2026

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