PHPackages                             maslosoft/signals - 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. maslosoft/signals

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

maslosoft/signals
=================

Wireless Cross-Component Communication

4.0.7(1y ago)06.9k[2 issues](https://github.com/Maslosoft/Signals/issues)8AGPL-3.0-onlyPHPPHP &gt;=7.4

Since Oct 25Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/Maslosoft/Signals)[ Packagist](https://packagist.org/packages/maslosoft/signals)[ Docs](https://maslosoft.com/signals/)[ RSS](/packages/maslosoft-signals/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (10)Versions (67)Used By (8)

[![Signals Logo](https://camo.githubusercontent.com/c695a4731b78cb8393b555947c89e62e793ad76bc87c8a520faf473e7f114903/68747470733a2f2f6d61736c6f736f66742e636f6d2f7369676e616c732f7369676e616c732e737667)](https://maslosoft.com/signals/) [Maslosoft Signals](https://maslosoft.com/signals/)
=============================================================================================================================================================================================================================================================================================

[](#-maslosoft-signals)

[*Wireless Cross-Component Communication*](https://maslosoft.com/signals/)

[![Latest Stable Version](https://camo.githubusercontent.com/41cb024b14591885e0527318901ddaed866491011cde6a08fa7ebb3612e05cd6/68747470733a2f2f706f7365722e707567782e6f72672f6d61736c6f736f66742f7369676e616c732f762f737461626c652e737667)](https://packagist.org/packages/maslosoft/signals "Latest Stable Version")[![License](https://camo.githubusercontent.com/f300f51d620a701255604ff2b22733cb9a05328bd02bdb902d77bcb55d509028/68747470733a2f2f706f7365722e707567782e6f72672f6d61736c6f736f66742f7369676e616c732f6c6963656e73652e737667)](https://packagist.org/packages/maslosoft/signals "License")[ ![Scrutinizer Code Quality](https://camo.githubusercontent.com/cec781602485b294e9898ed9f6d5c27ccf5065b1dc509eddc30508929228ef0e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d61736c6f736f66742f5369676e616c732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Maslosoft/Signals/?branch=master)[ ![Code Coverage](https://camo.githubusercontent.com/013a572d8533c23a237dffbf879292a5f080545b90fd324b2aed2ff8f071f59a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d61736c6f736f66742f5369676e616c732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Maslosoft/Signals/?branch=master)### Quick Install

[](#quick-install)

```
composer require maslosoft/signals
```

### Documentation

[](#documentation)

[Full Signals Documentation](https://maslosoft.com/signals/docs/)

Connecting components
=====================

[](#connecting-components)

Various application components must be connected to each other. This should be made in a soft manner, so that when adding or removing component code will not require to change.

### Wireless connection

[](#wireless-connection)

Signals provide somthing like wireless connection between components. On of them emit signal, the other receives it. This can be done other way around. That one application component sends signal, and several components listen to that signal.

Wireless cross-component communication
--------------------------------------

[](#wireless-cross-component-communication)

This component allows for interaction of application components, without prior or explicit assignment.

Setup
-----

[](#setup)

Use composer to install

```
composer require maslosoft/signals:"*"
```

Or by hard way, download somewhere in your project and ensure autoloading works for `Maslosoft\Signals\*` and you include dep too;

Setup signals. After calling `init` any further instance will be configured same as below `$signal`.

```
$signal = new Maslosoft\Signals\Signal();
$signal->runtimePath = RUNTIME_PATH;
$signal->paths = [
	MODELS_PATH
];
$signal->init();
```

Generate signals definition, only once, hook it to your build script etc.

```
$signal = new Maslosoft\Signals\Signal();
(new Maslosoft\Signals\Utility($signal))->generate();
```

Usage
-----

[](#usage)

### Emiting signal

[](#emiting-signal)

Define signal:

```
namespace MyNamespace\Signals;

class AccountMenuItems extends AdminMenuItems
{
	public $item = [];
}
```

Define class with slot with `@SlotFor` annotation

```
namespace Maslosoft\Ilmatar\Modules;

class MyModule
{
	/**
	 * @SlotFor(MyNamespace\Signals\AccountMenuItems)
	 */
	public function reactOnAccountMenu(MyNamespace\Signals\AccountMenuItems $signal)
	{
		$signal->item = [
			'url' => '/content/myBlog',
			'label' => 'My blog'
		];
	}
}
```

Emit signal and get results of this call:

```
$signal = new Maslosoft\Signals\Signal();
$result = $signal->emit(new AdminMenuItems());

echo $result[0]->item[0]['label']; // My blog
```

### Gathering signals

[](#gathering-signals)

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance55

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity78

Established project with proven stability

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

Recently: every ~212 days

Total

66

Last Release

464d ago

Major Versions

0.0.9 → 1.0.02014-10-15

1.1.18 → 2.0.02016-08-18

2.0.21 → 3.0.02019-05-29

3.0.1 → 4.0.02022-02-22

PHP version history (2 changes)3.0.0PHP &gt;=7

4.0.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![pmaselkowski](https://avatars.githubusercontent.com/u/520283?v=4)](https://github.com/pmaselkowski "pmaselkowski (270 commits)")

---

Tags

phpsignalseventeventssignalsignalsslotsslot

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/maslosoft-signals/health.svg)

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

###  Alternatives

[doctrine/event-manager

The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.

6.1k501.1M115](/packages/doctrine-event-manager)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k69.8M225](/packages/laminas-laminas-eventmanager)[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[jbzoo/event

Library for event-based development

29760.0k5](/packages/jbzoo-event)[tomaj/hermes

Simple php background processing library

38251.0k5](/packages/tomaj-hermes)

PHPackages © 2026

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