PHPackages                             matthiasnoback/tail-event-stream - 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. matthiasnoback/tail-event-stream

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

matthiasnoback/tail-event-stream
================================

A simple, tail-based event stream

v0.1.1(4y ago)4364MITPHPPHP ^8.0

Since Jan 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/matthiasnoback/tail-event-stream)[ Packagist](https://packagist.org/packages/matthiasnoback/tail-event-stream)[ RSS](/packages/matthiasnoback-tail-event-stream/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

TailEventStream
===============

[](#taileventstream)

An event stream library based on `tail`.

**Note: I don't think you should use this library in a real project, but it's great for educational purposes. I use it in workshops only.**"

Getting started
---------------

[](#getting-started)

Install using Composer:

```
composer require matthiasnoback/tail-event-stream

```

Usage
-----

[](#usage)

Adding messages to the stream:

```
use TailEventStream\Producer;

$streamFilePath = __DIR__ . '/var/stream.txt';

$producer = new Producer($streamFilePath);
$producer->produce('hello_world', ['Hello' => 'World!']);
```

The `stream.txt` file contains one message per line:

```
{"messageType":"hello_world","data":{"Hello":"World!"}}
```

Using `tail -f` a consumer can read each message from the stream, and it will keep consuming messages until you quit the process:

```
use TailEventStream\Consumer;

$streamFilePath = __DIR__ . '/var/stream.txt';

$consumer = new Consumer($streamFilePath);

$consumer->consume(function (string $messageType, array $data) {
    // $messageType will be 'hello_world'
    // $data will  be ['Hello' => 'World!']
});
```

`consume()` accepts a second argument, which is the index (or line) at which to start.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

1620d ago

PHP version history (2 changes)v0.1.0PHP ^8.1

v0.1.1PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1193078?v=4)[Matthias Noback](/maintainers/matthiasnoback)[@matthiasnoback](https://github.com/matthiasnoback)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/matthiasnoback-tail-event-stream/health.svg)

```
[![Health](https://phpackages.com/badges/matthiasnoback-tail-event-stream/health.svg)](https://phpackages.com/packages/matthiasnoback-tail-event-stream)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

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