PHPackages                             potfur/journal - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. potfur/journal

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

potfur/journal
==============

89PHP

Since Mar 26Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Journal
=======

[](#journal)

Heavily inspired by [EventCentric.Core](https://github.com/event-centric/EventCentric.Core) event sourcing framework.

How does it work
----------------

[](#how-does-it-work)

[Example](/example/) is a simplified case of bank accounts with two basic actions: `Deposit` and `Withdraw` to increase and decrease balance.

There is also a composite process - `Transfer` to show how sagas/process managers can be implemented.

- `Account` is a aggregate root, a class that is subject to actions from commands,
- each action that has effect on `Account` will create at least one `DomainEvent` instance, describing what happened, eg. `MoneyWereDepositedEvent` which says that some amount of money were deposited on `Account`
- `Account` stores those events in order of occurrence,
- `UnitOfWork` tracks events in `Account`, and when it is committed - all new events will be sent to `EventStore`,
- `EventStore` will store new events as `EventStream` - an immutable list of changes for this account.
- when new action occurs, `UnitOfWork` will reconstitute `Account` from stored events,
- when ever event is stored, event emitter sends it to all presenters so they can react to it,
- presenters `AccountHistoryPresenter` and `AccountBalancePresenter` subscribe to events and update data for read models, eg. as reaction to `MoneyWereDepositedEvent`, `AccountHistoryPresenter` will add new entry that says when and what amount was deposited. `AccountBalancePresenter` will increase accounts balance.

Example uses [Tactician](https://github.com/thephpleague/tactician) for command bus and [Event Dispatcher](http://symfony.com/doc/current/components/event_dispatcher/introduction.html) for emitting events, but they can be replaced with anything else.

Stuff that's missing
--------------------

[](#stuff-thats-missing)

- snapshots
- more elaborate example

License
-------

[](#license)

See [LICENSE](LICENSE).

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8addaf28c1a25afd6006377779228ee980528e4ca23793a4ab8bc426dda5018b?d=identicon)[potfur](/maintainers/potfur)

---

Top Contributors

[![potfur](https://avatars.githubusercontent.com/u/1244857?v=4)](https://github.com/potfur "potfur (1 commits)")

### Embed Badge

![Health badge](/badges/potfur-journal/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.3k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M273](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M335](/packages/open-telemetry-sdk)

PHPackages © 2026

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