PHPackages                             brzuchal/saga - 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. brzuchal/saga

ActiveLibrary

brzuchal/saga
=============

Saga Pattern Implementation

1.x-dev(3y ago)29781[1 PRs](https://github.com/brzuchal/saga/pulls)1MITPHPPHP ^8.1

Since Mar 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/brzuchal/saga)[ Packagist](https://packagist.org/packages/brzuchal/saga)[ RSS](/packages/brzuchal-saga/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependencies (9)Versions (3)Used By (1)

Saga Management
===============

[](#saga-management)

Install
-------

[](#install)

```
composer require brzuchal/saga
```

Usage
-----

[](#usage)

```
namespace App;

use App\Events\OrderCreated;
use Brzuchal\Saga\Mapping\Saga;
use Brzuchal\Saga\Mapping\SagaMessageHandler;
use Brzuchal\Saga\Mapping\SagaStart;

#[Saga]
class OrderProcessing
{
    #[SagaStart,SagaMessageHandler(associationKey: 'orderId', property: 'id')]
    public function whenCreated(OrderCreated $event): void
    {
        // ...
    }
}
```

Configuration
-------------

[](#configuration)

```
use App\OrderProcessing;
use App\Events\OrderCreated;
use Brzuchal\Saga\Mapping\AttributeMappingDriver;
use Brzuchal\Saga\Mapping\SagaMetadataFactory;
use Brzuchal\Saga\Repository\SimpleSagaRepositoryFactory;
use Brzuchal\Saga\SagaManager;
use Brzuchal\Saga\Store\InMemorySagaStore;

$repositoryFactory = new SimpleSagaRepositoryFactory(
    new InMemorySagaStore(),
    new SagaMetadataFactory([new AttributeMappingDriver()]),
);

$manager = new SagaManager($repositoryFactory->create(OrderProcessing::class));
$manager(new OrderCreated());
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

1150d ago

### Community

Maintainers

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

---

Top Contributors

[![brzuchal](https://avatars.githubusercontent.com/u/3149753?v=4)](https://github.com/brzuchal "brzuchal (43 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/brzuchal-saga/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

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