Skip to content
CAI
Software that uses CAICheck a score

spatie/laravel-eventsauce

60.0

Adequate · 22 September 2026

510

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 system is a Laravel package that implements event sourcing for domain-driven applications. It provides infrastructure for managing aggregate roots, dispatching messages via queues, and generating domain scaffolding through Artisan commands. The package integrates with Spatie's event sourcing libraries and includes comprehensive test coverage for its repository and command implementations.

Features

Added domain scaffolding stubs for event sourcing

The application now includes new stub templates for generating event-sourced domain components. Specifically, it adds an AggregateRoot stub that implements the EventSauce AggregateRoot interface and uses the AggregateRootBehaviour and IgnoresMissingMethods traits. It also provides an AggregateRootRepository stub that extends the Laravel EventSauce repository base, allowing users to define table names and consumer mappings. Additionally, a database migration stub for the domain\_messages table has been moved to the stubs directory, with placeholders for the table name and migration class name to facilitate code generation.

src/Commands/stubs · medium confidence

New MakeAggregateRootCommand and updated code generation

Added a new \MakeAggregateRootCommand\ Artisan command that scaffolds an aggregate root class, its repository, and a corresponding database migration. Updated the existing \GenerateCodeCommand\ to use a flatter configuration path (\eventsauce.code\_generation\ instead of \eventsauce.aggregate\roots.\.code\_generation\) and added a filter to skip entries where the input YAML file is null.

src/Commands · high confidence

Behavioural changes

New exception class for aggregate root creation failures

A new exception class, CouldNotMakeAggregateRoot, has been added to the application's exception hierarchy. This class provides a specific error handling path for scenarios where an aggregate root cannot be created, such as when a file already exists at the target path. This allows the application to catch and handle these specific failures distinctly from other exceptions.

src/Exceptions · high confidence

Refactor EventSauce configuration to use Spatie package classes

The EventSauce configuration has been updated to replace the default Laravel EventSauce classes with Spatie's implementation. Specifically, the 'dispatcher' is now set to use the Spatie MessageRepository, the 'repository' is updated to use Spatie's MessageRepository class, and the 'queued\_message\_job' is configured to use Spatie's QueuedMessageJob. Additionally, the 'aggregate\_roots' configuration has been removed in favor of a simplified 'code\_generation' section, and a new 'database\_connection' setting has been added for message storage.

config · medium confidence

Refactor event sourcing infrastructure with new repository and queue-based dispatching

The library introduces a new \AggregateRootRepository\ and \QueuedMessageDispatcher\ to handle event sourcing and message dispatching, replacing the previous synchronous and asynchronous dispatcher implementations. The \MessageRepository\ is updated to accept a configurable table name and supports retrieving events after a specific version, while the service provider is simplified to remove manual binding of multiple dispatcher and aggregate root registrations.

src · high confidence

Update changelog and add PHP CS Fixer configuration

The CHANGELOG.md was updated to record support for Laravel 8.0 and PHP 8 in version 2.1.0, and a new .php\_cs file was added to configure PHP CS Fixer with PSR-2 rules and specific formatting preferences. Additionally, legacy CI and code quality configuration files (.scrutinizer.yml, .travis.yml, and CONTRIBUTING.md) were removed, and the .gitignore was updated to include new cache and temporary files.

(repo-wide) · high confidence

Test coverage

Added Filesystem mock for testing; Added test helper classes for event sourcing; Added tests for code generation and aggregate root creation commands; Added tests for the Laravel EventSauce package.

Dependencies

Upgrade to Laravel 7/8 and PHP 8 support

The package now supports PHP 8.0 and 7.4, and is compatible with Laravel 7 and 8. This includes updating the illuminate/\* dependencies to versions 7.0 or 8.0, upgrading eventsauce to ^0.8, ramsey/uuid to ^4.0, and adding spatie/temporary-directory. Development dependencies are also updated, including PHPUnit to 9.4.0 and orchestra/testbench to 5.0/6.0.

(dependencies) · high confidence

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

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 56 → 60 (+4.4)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 50 → 50 (+0.0)
  • Readiness 46 → 58 (+12.3)
  • Security 85 → 89 (+3.7)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (12)

  • Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No dependency advisory monitoring
  • Workflow token permissions not restricted

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

Survey your own repository

spatie/laravel-eventsauce 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 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 750c440f2c28b15ab92adf1b47f6123c718e41ee — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.