Skip to content
CAI
Software that uses CAICheck a score

gosuperscript/laravel-eventstore

59.8

Adequate · 9 November 2026

996

lines of production code

PHP

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This is a Laravel package that integrates Greg Young's EventStore with the framework's event system, enabling automatic persistence of domain events to an event store. It provides configuration, logging, and worker processes to handle event streams in parallel, while offering testing utilities to verify event state. The system supports multiple Laravel versions and modern PHP dependencies.

Features

Add event store assertion helpers for testing

Added new test utilities in src/TestUtils to verify event store state. The InteractsWithEventStore trait provides methods to assert that specific events were raised, were not raised, or occurred in a specific order. These assertions are backed by new constraint classes (EventOnEventStoreConstraint, EventNotOnEventStoreConstraint, EventsOnEventStoreConstraint) that query the event store client to check for event presence and order. Additionally, a MakesEventRecords trait was added to simplify the creation of mock event records for tests.

src/TestUtils · high confidence

Initial release of the Laravel EventStore package

The package is introduced, providing a way to integrate Greg Young's eventstore with Laravel's event system. Users can mark events with the \ShouldBeStored\ interface to automatically persist them to an event store, and configure a service provider to handle event-to-class mapping and logging. The release includes configuration for TCP and HTTP URLs, stream definitions, and subscription settings, along with standard project scaffolding like \.editorconfig\, \phpunit.xml.dist\, and documentation files.

(repo-wide) · high confidence

Introduce event store contracts and listener for event persistence

Added two new interfaces, CouldBeReceived and ShouldBeStored, to define the contract for event objects that can be persisted to the event store. A new listener, SendToEventStoreListener, was introduced to handle the persistence of events by posting them to the event store's API, ensuring that events are not duplicated if they have already been received.

src/Contracts, src/Listeners · high confidence

Introduce eventstore configuration file with environment variable support

A new configuration file for the Eventstore connection has been added, defining endpoints for TCP and HTTP URLs, subscription and volatile stream lists, the subscription group, and a connection identifier. All values default to environment variables (e.g., EVENTSTORE\_TCP\_URL, EVENTSTORE\_HTTP\_URL, EVENTSTORE\_SUBSCRIPTION\_STREAMS, EVENTSTORE\_VOLATILE\_STREAMS, EVENTSTORE\_SUBSCRIPTION\_GROUP, and EVENTSTORE\_CONNECTION), allowing users to configure the Eventstore connection via environment variables rather than hardcoded values.

config · high confidence

New traits for event store integration and metadata collection

Added five new PHP traits in the \src/Traits\ directory to support event sourcing. \SendsToEventStore\ provides methods to serialize public properties and extract metadata for events. \ReceivedFromEventStore\ handles deserializing events from the store. Three new metadata traits (\AddsHerokuMetadata\, \AddsLaravelMetadata\, \AddsUserMetaData\) allow automatic inclusion of environment-specific, framework-specific, and current user data in event metadata.

src/Traits · high confidence

Removals

Removal of legacy EventStore classes

The EventStore module has removed several core classes: the abstract SendEvent and ReceiveEvent base classes, their corresponding listener classes (SendEventListener, ReceiveEventListener), the ShouldBeSent and ShouldBeReceived interfaces, and the Stream base class along with its specific implementations (AccountsStream, BusinessExceptionsStream, QuotesStream). This eliminates the previous mechanism for sending and receiving events through HTTP requests and stream-based storage.

src/EventStore · high confidence

Behavioural changes

Refactored EventStore configuration and logging defaults

The package now provides default implementations for event-to-class mapping and logging, removing the need for manual configuration in most cases. The \EventStore\ class now includes static methods (\eventToClass\, \workerLogger\, \workerErrorLogger\, \threadLogger\) that set up sensible defaults (e.g., mapping events to \App\\Events\\\*\ classes, using Laravel's Log facade). The \ServiceProvider\ automatically registers these defaults if not already set. Additionally, the \Client\ class was moved from \src/EventStore/Client.php\ to \src/Client.php\ and updated to read the EventStore URL from \config('eventstore.http\_url')\ instead of \config('services.eventstore.web\_url')\. This simplifies setup by requiring fewer configuration steps for common use cases.

src · high confidence

Refactored EventStore worker to use separate threads for each stream

The EventStore worker has been refactored to spawn a separate process for each subscription stream, allowing volatile and persistent streams to be handled in parallel. The main worker now manages these child processes, restarting them if they stop, and logs their output and errors. A new \EventStoreWorkerThread\ command handles the actual subscription logic for each stream, and a \ConnectionLostException\ was added to track connection issues.

src/Console · high confidence

Test coverage

Added TestEvent fixture for event handling tests; Added test coverage for event store components.

Dependencies

Update Laravel and dependency support

The package now supports Laravel 5.7 through 8.x, allowing users to integrate the event store with a wider range of Laravel versions. Additionally, the library has been updated to support both Ramsey UUID versions 3.8 and 4.0, and Guzzle HTTP client versions 6.3 through 7.x.

(dependencies) · medium confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 57 → 60 (+2.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 73 → 73 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 44 → 50 (+5.8)
  • Readiness 67 → 67 (+0.0)
  • Security 76 → 70 (-6.0)

Resolved (5)

  • Documentation: no project overview (README.md)
  • Duplicate interface/contract definition. The methods getEventRecord and setEventRecord are defined identically in both the CouldBeReceived interface and the ReceivedFromEventStore trait. This creates ambiguity for implementers: should they implement the interface, use the trait, or both? It suggests a failure to unify the 'received event' contract.
  • Partial duplication of 'stored event' contract. SendsToEventStore trait implements 4 of the 5 methods defined in ShouldBeStored interface, but omits getEventStream(). This forces implementers to either implement the missing method manually or rely on the interface, leading to inconsistent implementation patterns across the codebase.
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

gosuperscript/laravel-eventstore was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 814abc428f1232cc4e1fc8b4f1217e3555762217 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.