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

ActiveLibrary

ensi/initiator-propagation
==========================

initial event propagation

0.3.2(1y ago)2261MITPHPPHP ^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/initiator-propagation)[ RSS](/packages/ensi-initiator-propagation/feed)WikiDiscussions master Synced 3d ago

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

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

33

—

LowBetter than 75% of packages

Maintenance45

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community13

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

425d 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-initiator-propagation/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)

PHPackages © 2026

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