PHPackages                             ensi/initial-event-propagation - 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. ensi/initial-event-propagation

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

ensi/initial-event-propagation
==============================

initial event propagation

0.3.2(1y ago)286.1k↓24.3%11MITPHPPHP ^8.1CI passing

Since Nov 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ensi-platform/php-initial-event-propagation)[ Packagist](https://packagist.org/packages/ensi/initial-event-propagation)[ RSS](/packages/ensi-initial-event-propagation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (12)Used By (1)

PHP Initial Event Propagation
=============================

[](#php-initial-event-propagation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8cf21b39ca5ecc6020a0d8d27181821636dabd932b3a022efb1fd441b400870b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e73692f696e697469616c2d6576656e742d70726f7061676174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ensi/initial-event-propagation)[![Tests](https://github.com/ensi-platform/php-initial-event-propagation/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/ensi-platform/php-initial-event-propagation/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/2fb14e25d2e8d9752cd7092393d58ecd4249dfd50df8e80108cfe1813bd32b62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e73692f696e697469616c2d6576656e742d70726f7061676174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ensi/initial-event-propagation)

This package helps to propagate initial event data to other backend services [Laravel Bridge](https://github.com/ensi-platform/laravel-initial-event-propagation/)

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

[](#installation)

You can install the package via composer:

```
composer require ensi/initial-event-propagation
```

Version Compatibility
---------------------

[](#version-compatibility)

Laravel IEPPHP^0.1.0^8.0^0.2.0^8.0^0.3.0^8.1Basic usage
-----------

[](#basic-usage)

First of all you need to create initial event data and place it to holder:

```
use Ensi\InitialEventPropagation\InitialEventHolder;
use Ensi\InitialEventPropagation\InitialEventDTO;

InitialEventHolder::getInstance()
    ->setInitialEvent(
        InitialEventDTO::fromScratch(
            userId: "1",
            userType: "admin",
            app: "mobile-api-gateway",
            entrypoint: "/api/v1/users/{id}"
        )
    );
```

If you are not in initial entrypoint context to need to get initial event from `X-Initial-Event` request header instead of creating it from scratch:

```
use Ensi\InitialEventPropagation\Config;
use Ensi\InitialEventPropagation\InitialEventHolder;
use Ensi\InitialEventPropagation\InitialEventDTO;

InitialEventHolder::getInstance()
    ->setInitialEvent(
        InitialEventDTO::fromSerializedString($request->header(Config::REQUEST_HEADER))
    );
```

Next, extract DTO from holder (`InitialEventHolder::getInstance()->getInitialEvent()`) and pass it to any futher outcomming requests (Guzzle, RabbitMQ, Kafka etc) For example:

```
use Ensi\InitialEventPropagation\Config;
use Ensi\InitialEventPropagation\InitialEventHolder;

function some_middleware(callable $handler)
{
    return function (RequestInterface $request, $options) use ($handler) {
        $inititiator = InitialEventHolder::getInstance()->getInitialEvent();

        return $handler(
            $inititiator ? $request->withHeader(Config::REQUEST_HEADER, $inititiator->serialize()) : $request,
            $options
        );
    };
}
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

### Testing

[](#testing)

1. composer install
2. composer test

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance45

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.2% 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 ~121 days

Recently: every ~136 days

Total

11

Last Release

431d ago

PHP version history (2 changes)0.1.0PHP ^8.0

0.3.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8089373?v=4)[Наталия](/maintainers/MsNatali)[@MsNatali](https://github.com/MsNatali)

![](https://avatars.githubusercontent.com/u/7352966?v=4)[Andrey](/maintainers/dimionx)[@DimionX](https://github.com/DimionX)

---

Top Contributors

[![MsNatali](https://avatars.githubusercontent.com/u/8089373?v=4)](https://github.com/MsNatali "MsNatali (16 commits)")[![valerialukinykh](https://avatars.githubusercontent.com/u/123940772?v=4)](https://github.com/valerialukinykh "valerialukinykh (2 commits)")[![C0rTeZ13](https://avatars.githubusercontent.com/u/120840631?v=4)](https://github.com/C0rTeZ13 "C0rTeZ13 (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ensi-initial-event-propagation/health.svg)

```
[![Health](https://phpackages.com/badges/ensi-initial-event-propagation/health.svg)](https://phpackages.com/packages/ensi-initial-event-propagation)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[getdkan/dkan

DKAN Open Data Catalog

385135.4k2](/packages/getdkan-dkan)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[tomaj/hermes

Simple php background processing library

38251.0k5](/packages/tomaj-hermes)

PHPackages © 2026

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