Skip to content
CAI
Software that uses CAICheck a score

albertoarena/laravel-event-sourcing-generator

75.4

Adequate · 8 November 2026

1.7k

lines of production code

PHP

with JavaScript

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add specific exception classes for migration validation errors

The library now introduces dedicated exception classes to provide clearer error reporting during migration generation. New exceptions include MigrationDoesNotExistException for missing files, MigrationInvalidException for reserved keyword conflicts (create/update), MigrationInvalidPrimaryKeyException for invalid primary key definitions, and ParserFailedException for general parsing failures, allowing developers to handle these specific scenarios more precisely.

src/Exceptions · high confidence

Added PackageServiceProvider to register the MakeEventSourcingDomain command

A new PackageServiceProvider has been introduced in the src/Providers directory to register the MakeEventSourcingDomain console command. This ensures the command is automatically available when the application is running in the console, allowing users to generate event-sourcing domain components via the CLI.

src/Providers · high confidence

Added plumb-scan script for triggering quality re-scans

A new shell script, scripts/plumb-scan.sh, has been added to allow users to manually request an asynchronous quality re-scan of the package on plumbphp.dev. Running this script sends a POST request to the public API endpoint, enabling users to refresh the package's quality score after making changes to CI configuration, security documentation, dependencies, or releases. The script defaults to the current package but can be configured to scan arbitrary packages by providing vendor and name arguments.

scripts · high confidence

Introduce CommandSettings configuration model for code generation

A new CommandSettings class has been added to manage configuration options for the command generation process. This model allows users to specify details such as the target model, domain, namespace, and root folder, while also controlling the generation of aggregates, reactors, and unit tests. It includes logic to automatically infer whether the Carbon library is required based on property types and supports configuration for UUID primary keys, indentation, and excluded migration fields.

src/Domain/Command/Models · high confidence

New Migration class for parsing and filtering database migrations

A new \Migration\ class has been introduced in the domain layer to handle the parsing and management of Laravel database migrations. This component scans the \database/migrations\ directory, applies optional exclusion filters via regex or string matching, and extracts migration properties and ignored fields using the \MigrationParser\. It exposes the primary column name, parsed properties, and ignored items, enabling downstream generators to accurately reflect existing schema structures while respecting user-defined exclusions.

src/Domain/Migrations · high confidence

New PHP parser traits for method and schema node handling

Added two new traits, HasMethodNode and HasSchemaUpNode, to the PhpParser domain. HasMethodNode provides a reusable mechanism to locate and process specific method statements within class nodes, while HasSchemaUpNode leverages this to specifically target the 'up' method in schema migrations, enabling more structured parsing of Laravel migration files.

src/Domain/PhpParser/Concerns · high confidence

New command to generate Spatie Event Sourcing domains

A new \make:event-sourcing-domain\ console command has been added to scaffold Spatie Event Sourcing domain structures. It supports generating domains from existing database migrations (with support for excluded columns and warnings on unsupported types) or via interactive prompts, and allows configuring options such as UUID primary keys, indentation, failed events, and various notification types (database, mail, slack, teams).

src/Console · high confidence

New contract interfaces for notification channels and default settings

Added two new interfaces to the command contracts: AcceptedNotificationInterface, which defines constants for supported notification channels (mail, slack, teams, database), and DefaultSettingsInterface, which defines the 'app' setting constant. These interfaces provide a standardized way to reference notification types and default application settings within the command domain.

src/Domain/Command/Contracts · high confidence

New event-sourcing code generation stubs with notification and failure support

The stubs directory now provides a comprehensive set of templates for generating event-sourced domain components, including actions (with and without aggregates), aggregates, data transfer objects, projections, projectors, and reactors. A significant addition is the support for notifications (Mail, Slack, Microsoft Teams, and database) and failed-event handling; the stubs now generate corresponding notification classes, concern traits, and projector/reactor logic to dispatch notifications or trigger failure events when operations fail.

stubs · high confidence

Behavioural changes

Documentation site migrated to Astro Starlight with automated reference generation

The documentation site has been rebuilt using Astro 7 and the Starlight theme, providing a modern, responsive documentation experience with a custom indigo/violet brand identity. To ensure accuracy, a new \bin/docs-sync.php\ tool automatically generates and updates key reference sections—including command options, compatibility matrices, and unsupported column lists—directly from the source code and CI configuration, eliminating manual drift. The site also includes a script for generating social cover images and is configured to run on Node 22.

bin, website · high confidence

New PHP parser models for migration property analysis

The generator now includes a new set of domain models in src/Domain/PhpParser/Models to parse and represent Laravel migration schema definitions. EnterNode provides a traversal structure for AST nodes, while MigrationCreateProperties and MigrationCreateProperty handle the collection and validation of column definitions, including support for dropColumn, renameColumn, and specific handling of primary keys (throwing an exception for uuid 'id' combinations). MigrationCreatePropertyType manages type normalization, nullable detection, and Carbon inference, enabling the generator to accurately translate migration blueprints into code structures.

src/Domain/PhpParser/Models · high confidence

Package distribution is slimmed by excluding development files

The Composer package archive is now significantly smaller because development-only files—such as CI workflows, documentation, tests, the website, and static analysis configurations—are excluded from the distributed \dist\ archive via \.gitattributes\ \export-ignore\ rules. This change reduces download size and clutter for end users without affecting the runtime functionality of the generator.

(repo-wide) · high confidence

Refactored stub generation with new Pipeline and StubResolver components

The stub generation system has been refactored to improve modularity and replace the abandoned \aldemeery/onion\ dependency with a new internal \Pipeline\ class for processing layers. A new \StubResolver\ class now handles the resolution of stub file paths and output destinations, while \StubReplacer\ manages the injection of model properties, ignored fields, and configuration settings into stub templates. Additionally, \StubCallback\ provides a mechanism for executing custom logic during stub processing, and the \Stubs\ class now supports conditional generation based on settings such as unit tests, failed events, notifications, reactors, and aggregates.

src/Domain/Stubs · high confidence

Support for JSONB columns and explicit handling of skipped/unsupported schema methods

The Blueprint generator now maps JSON and JSONB database columns to the 'array' built-in type, enabling proper serialization for these data structures. Additionally, it explicitly ignores database indexes, foreign key constraints, and soft delete methods during code generation, and marks specific column types (such as binary, ULID, and morphs) as unsupported to prevent invalid output.

src/Domain/Blueprint · high confidence

Support for dropColumn and renameColumn in migration parsing

The migration parser now recognizes and processes \dropColumn\ and \renameColumn\ operations within the \up()\ method. When a column is dropped, it is recorded in the properties list; when a column is renamed, the new name is recorded. Unsupported or skipped operations are tracked separately in an ignored list, allowing users to see which parts of their migration schema were not fully converted.

src/Domain/PhpParser/Traversers · high confidence

The code generator now creates dedicated directories for notifications when the corresponding setting is enabled. Specifically, the new \CanCreateDirectories\ concern ensures that \Notifications\ and \Notifications/Concerns\ folders are generated within the domain path, allowing users to organize notification classes and their associated concerns separately from other domain artifacts.

src/Domain/Command/Concerns · high confidence

Test coverage

Added test infrastructure for migration parsing and modification; Added test infrastructure for validating generated domain code; Added unit tests for migration property models and pipeline support; Added unit tests for the event-sourcing domain generation command.

Dependencies

Initial dependency manifests for Laravel package and documentation site

This change introduces the \composer.json\ and \composer.lock\ files for the \albertoarena/laravel-event-sourcing-generator\ package, establishing support for PHP 8.3, 8.4, and 8.5, and locking dependencies such as \nikic/php-parser\ and \spatie/laravel-event-sourcing\. It also adds the \package.json\ and \package-lock.json\ files for the \/website\ directory, configuring the documentation site with Astro 7.2.6, Starlight 0.41.8, and Sharp 0.35.3.

(dependencies) · high 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 63 → 75 (+12.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (+0.0)
  • Architecture 96 → 96 (+0.7)
  • Maturity 46 → 74 (+27.3)
  • Readiness 73 → 73 (+0.0)
  • Security 89 → 85 (-4.3)

Resolved (3)

  • ADR has no Consequences section (docs/plans/completed/2026-06-30-expand-laravel-12-13-support-matrix.md)
  • Inconsistent naming convention for data retrieval methods. The Migration class uses snake_case (properties, ignored), while the MigrationParser class uses camelCase with 'get' prefix (getProperties, getIgnored). This mixes PSR-12/PHP conventions within the same domain (migration parsing/processing).
  • Inconsistent return types for 'primary' operations. Migration.primary() returns a nullable string (likely the column name), while MigrationCreateProperties.primary() returns a complex object (MigrationCreateProperty). This forces consumers to handle different types depending on whether they are querying an existing migration or constructing a new one.

Changes since last survey

  • 5 commits — 5 feature/other, 0 fixes

By area

  • website/package-lock.json — 3 commits
  • (root) — 2 commits

Notable commits

  • change: Chore(deps): Bump postcss-selector-parser (#75)
  • change: Chore(deps): Bump the composer-minor-patch group across 1 directory with 2 updates (#76)
  • change: Chore(deps): Bump the website-minor-patch group (#73)
  • change: Chore(deps): Bump the website-security group across 1 directory with 2 updates (#78)
  • change: Docs: record October 26 dependency updates as Unreleased (#79)

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

Survey your own repository

albertoarena/laravel-event-sourcing-generator 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 8 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 a93103bba58e2be660fca925b189d9487f43e5c7 — 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-45ab2cab63de.