PHPackages                             selvinortiz/gossip - 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. selvinortiz/gossip

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

selvinortiz/gossip
==================

Lightweight event broadcasting library for PHP 5.4+

v1.0.0(10y ago)111782MITPHPPHP &gt;=5.4

Since Feb 21Pushed 10y ago2 watchersCompare

[ Source](https://github.com/selvinortiz/gossip)[ Packagist](https://packagist.org/packages/selvinortiz/gossip)[ Docs](https://github.com/selvinortiz/zit)[ RSS](/packages/selvinortiz-gossip/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

[![Gossip](Gossip.png)](Gossip.png)

[![Build Status](https://camo.githubusercontent.com/af7645786f271ba9cc410b5b170cb8e98ef092a87cf3fa00a1747b228326810e/68747470733a2f2f7472617669732d63692e6f72672f73656c76696e6f7274697a2f676f737369702e706e67)](https://travis-ci.org/selvinortiz/gossip)[![Total Downloads](https://camo.githubusercontent.com/6aa0e090d86d5e3b7330a5d3ac0b8bf6787059a4af523e782154a65b060452f1/68747470733a2f2f706f7365722e707567782e6f72672f73656c76696e6f7274697a2f676f737369702f642f746f74616c2e706e67)](https://packagist.org/packages/selvinortiz/gossip)[![Latest Stable Version](https://camo.githubusercontent.com/a743749cb40553dd48f0802cb31466d315f3ee3b6ed8415682d2fa3e9422ae99/68747470733a2f2f706f7365722e707567782e6f72672f73656c76696e6f7274697a2f676f737369702f762f737461626c652e706e67)](https://packagist.org/packages/selvinortiz/gossip)

### Description

[](#description)

> **Gossip** is a tiny event broadcasting library written by [Selvin Ortiz](https://selvinortiz.com)

### Requirements

[](#requirements)

- PHP 5.4+
- [Composer](http://getcomposer.org) and [selvinortiz/gossip](https://packagist.org/packages/selvinortiz/gossip)

### Install

[](#install)

```
composer require selvinortiz/gossip
```

### Test

[](#test)

```
sh spec.sh
```

### Usage

[](#usage)

> Event broadcasting is a fancy way of saying that **Gossip** allows you to register your *responders* to *listen* for a specific event and when that event is *whispered*, it can respond.

```
use SelvinOrtiz\Gossip\Gossip;

class App
{
	public function init()
	{
		Gossip::instance()->whisper(new Event('app.init'));
	}

	public function end()
	{
		Gossip::instance()->whisper(new Event('app.end', [$this]));
	}

	public function log($message)
	{
		// Log a $message to db or file system
	}
}

// Called when app.init is whisper()ed
Gossip::instance()->listen('app.init', function (Event &$event) {
	// Bootstrap third party code, initialize services, etc.
});

// Called only the first time app.end is whisper()ed
Gossip::instance()->listenOnce('app.end', function (Event &$event, $app) {
	// Close db connections, destroy sessions, etc.
	$app->log('Application is ending...');
});
```

### API

[](#api)

> API reference is coming soon...

### Contribute

[](#contribute)

> **Gossip** wants to be friendly to *first time contributors*. Just follow the steps below and if you have questions along the way, please reach out.

1. Fork it!
2. Create your bugfix or feature branch
3. Commit and push your changes
4. Submit a pull request

### License

[](#license)

**Gossip** is open source software licensed under the [MIT License](LICENSE.txt)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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

Total

2

Last Release

3659d ago

Major Versions

v0.2.0 → v1.0.02016-06-23

PHP version history (2 changes)v0.2.0PHP &gt;=5.3.2

v1.0.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/93d52d70a5bafe64daf0512be1f3473bae56fa5bfb255258e30d6de3dcfcd170?d=identicon)[selvinortiz](/maintainers/selvinortiz)

---

Top Contributors

[![selvinortiz](https://avatars.githubusercontent.com/u/1922523?v=4)](https://github.com/selvinortiz "selvinortiz (5 commits)")

---

Tags

eventsnotificationsgossip

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/selvinortiz-gossip/health.svg)

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

###  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.0k517.6M149](/packages/doctrine-event-manager)[psr/event-dispatcher

Standard interfaces for event handling.

2.3k650.1M1.2k](/packages/psr-event-dispatcher)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k71.7M251](/packages/laminas-laminas-eventmanager)[simshaun/recurr

PHP library for working with recurrence rules

1.6k16.7M51](/packages/simshaun-recurr)[chelout/laravel-relationship-events

Missing relationship events for Laravel

5252.4M17](/packages/chelout-laravel-relationship-events)[tormjens/eventy

The WordPress filter/action system in Laravel

438937.3k23](/packages/tormjens-eventy)

PHPackages © 2026

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