Skip to content
CAI
Software that uses CAICheck a score

prooph/event-store

63.5

Adequate · 9 November 2026

5.4k

lines of production code

PHP

primary language

10

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a PHP-based event store client library that provides a modern, strongly-typed API for interacting with event-sourced systems. It supports core event store operations including connection management, stream and catch-up subscriptions, and persistent subscriptions, alongside management of projections and user accounts. The codebase has been significantly refactored to remove legacy adapters, deprecated interfaces, and outdated testing infrastructure, focusing instead on clean, type-safe interactions with the event store.

How it got here

2014 — EventStore component removal and modernization

16 changes.

This period focused on the complete removal of the legacy Prooph EventStore component and its associated adapters, including support for Zend Framework 2. The project also modernized its development infrastructure by updating to PHP 8.1+, upgrading dependencies, and integrating static analysis and code style tools.

2015–2020 — v8 API and internal refactoring

8 changes.

This period was dominated by the complete rewrite of the library for version 8, introducing a modern, strongly-typed API with new interfaces and value objects for connections, subscriptions, projections, and user management. Internal architecture was restructured to support persistent subscriptions and transaction handling, while utility classes for DateTime, Guid, and JSON were introduced to replace legacy implementations.

Features

Introduce new value objects and interface for persistent subscription details

Added new immutable value objects—PersistentSubscriptionConfigDetails, PersistentSubscriptionConnectionDetails, and PersistentSubscriptionDetails—each providing structured access to configuration, connection, and overall subscription state. These classes expose properties such as resolveLinktos, messageTimeoutMilliseconds, averageItemsPerSecond, and connectionCount, enabling more granular inspection of persistent subscriptions. A corresponding PersistentSubscriptionsManager interface defines the contract for describing, listing, and replaying messages for persistent subscriptions.

src/PersistentSubscriptions · high confidence

Introduce user management domain models and manager interface

The UserManagement namespace now includes value objects for user data and operations: ChangePasswordDetails, RelLink, ResetPasswordDetails, UserCreationInformation, UserDetails, and UserUpdateInformation, alongside the UsersManager interface that defines methods for creating, updating, enabling, disabling, and deleting users, as well as retrieving user details and managing passwords.

src/UserManagement · high confidence

New projection management and query execution interfaces

The Projections namespace now introduces a new set of classes and interfaces for managing projections and executing queries. This includes the ProjectionsManager and QueryManager interfaces, which provide methods to enable, disable, abort, create, and delete projections, as well as to list and retrieve their status, state, and statistics. Additionally, new value objects like ProjectionDetails, ProjectionStatistics, Query, and State are introduced to represent projection metadata and query results, enabling users to interact with the event store's projection system through a more structured and typed API.

src/Projections · high confidence

New utility classes for DateTime, Guid, and JSON handling

The src/Util directory now contains three new utility classes: DateTime, which provides static methods for creating and formatting DateTimeImmutable objects; Guid, which wraps the Ramsey UUID library to generate, parse, and format UUIDs; and Json, which offers static methods for encoding and decoding JSON with specific flags like JSON\_THROW\_ON\_ERROR. These classes replace previous implementations or inline code with dedicated, reusable utilities.

src/Util · high confidence

New v8 event-store API with modern PHP types and interfaces

The \src\ directory has been completely rewritten for version 8, introducing a new set of interfaces and value objects that define the event-store contract. This includes new interfaces for managing connections (\EventStoreConnection\), subscriptions (\EventStoreSubscription\, \EventStoreCatchUpSubscription\, \EventStoreAllCatchUpSubscription\, \EventStoreStreamCatchUpSubscription\, \EventStorePersistentSubscription\), and transactional writes (\EventStoreTransaction\). The update also introduces numerous new value objects and enums to replace previous patterns, such as \AllCheckpoint\, \AllEventsSlice\, \CatchUpSubscriptionSettings\, \ConditionalWriteResult\, \DeleteResult\, \EndPoint\, \EventReadResult\, \EventReadStatus\, \ExpectedVersion\, \PersistentSubscriptionSettings\, and various status enums like \ConditionalWriteStatus\ and \PersistentSubscriptionCreateStatus\. These changes provide a more strongly-typed and structured API for interacting with the event store.

src · high confidence

Removals

Removed ZF2 Event Store adapter

The Zf2EventStoreAdapter class has been removed from the codebase. This adapter previously provided event store persistence for the Zend Framework 2 ecosystem, including schema creation and event loading/writing functionality. Its removal indicates that support for this specific adapter is no longer maintained or required.

src/Prooph/EventStore/Adapter/Zf2 · high confidence

Removed deprecated EventStore adapter and transaction interfaces

The \Prooph\\EventStore\\Adapter\\AdapterInterface\ and \Prooph\\EventStore\\Adapter\\Feature\\TransactionFeatureInterface\ have been removed from the codebase. This eliminates the legacy adapter contract and the specific transaction feature interface that the \EventStore\ class previously relied on for transactional support.

src/Prooph/EventStore · high confidence

Removed legacy EventStore configuration classes

The \Prooph\\EventStore\\Configuration\\Configuration\ class and its associated \ConfigurationException\ have been removed from the codebase. This change eliminates the previous mechanism for configuring the event store adapter and repository mappings via a configuration array, indicating a shift in how the event store is initialized and configured within the application.

src/Prooph/EventStore/Configuration · high confidence

Architecture

Internal refactoring of event store connection and subscription handling

The src/Internal directory has been restructured with the addition of several new internal classes and interfaces to support persistent subscriptions, transaction handling, and client event management. Specifically, ConnectToPersistentSubscriptions and EventStoreTransactionConnection define internal interfaces for subscription operations and transactional writes. PersistentEventStoreSubscription implements the subscription logic, delegating to the new interface. A new EventHandler class manages client connection lifecycle events (connected, disconnected, reconnecting, closed, error, authentication failed) by attaching and detaching ListenerHandler callbacks. Additional internal classes include Consts for configuration defaults, DateTimeStringBugWorkaround for date formatting, DropData for subscription drop reasons, and ResolvedEvent for event resolution. These changes represent an internal architectural shift to better separate concerns in the event store client implementation.

src/Internal · high confidence

Behavioural changes

Exception classes migrated to PSR-4 namespace

The exception classes in the \src/Exception\ directory have been moved from the legacy \Prooph\\EventStore\\Exception\ namespace to the modern \Prooph\\EventStore\\Exception\ namespace, aligning with PSR-4 autoloading standards. This change updates the namespace declarations and file locations for all exception types, including \EventStoreException\, \RuntimeException\, \InvalidArgumentException\, and specific error classes like \AccessDenied\, \ConnectionClosed\, and \WrongExpectedVersion\, ensuring consistent error handling across the library.

src/Exception · high confidence

Removal of event-sourcing classes and lifecycle events

The \AggregateChangedEvent\, \EventSourcedAggregateRoot\, and related exception classes (\IdentifierPropertyNotFoundException\, \NoHandlerFoundException\) have been removed from the \Prooph/EventStore/EventSourcing\ namespace. Additionally, the \DetermineEventHandler\ and \GetIdentifierProperty\ lifecycle event classes in \Prooph/EventStore/LifeCycleEvent\ have been deleted. This change eliminates the previous mechanism for automatically mapping and dispatching domain events to aggregate roots, requiring users to adopt a different approach for handling event sourcing and lifecycle events.

src/Prooph/EventStore/EventSourcing, src/Prooph/EventStore/LifeCycleEvent · medium confidence

Removed EventSourcingRepository and its interface

The \EventSourcingRepository\ class and the \RepositoryInterface\ interface have been removed from the \src/Prooph/EventStore/Repository\ directory. This eliminates the previous concrete implementation and its contract for managing event-sourced aggregates, signaling a shift in how the event store handles aggregate persistence.

src/Prooph/EventStore/Repository · high confidence

Removed adapter exception classes

The \AdapterException\ interface and the \ConfigurationException\ and \InvalidArgumentException\ classes in the \Prooph\\EventStore\\Adapter\\Exception\ namespace have been removed from the codebase. This eliminates the custom exception hierarchy for adapter-related errors, which may affect code that relied on these specific exception types.

src/Prooph/EventStore/Adapter/Exception · high confidence

Removed obsolete event-mapping classes from the EventStore component

The \AggregateRootDecorator\ and \OnEventNameHandlerStrategy\ classes have been removed from the \Prooph\\EventStore\\Mapping\ namespace. These classes previously handled aggregate root decoration and event name resolution for the event store, and their removal indicates a refactoring of how the event store maps and processes events.

src/Prooph/EventStore/Mapping · high confidence

Removed obsolete event-store builder classes

The \AggregateIdBuilder\, \AggregateIdType\ interface, and \EventBuilder\ classes in \src/Prooph/EventStore/Adapter/Builder\ have been removed. These classes previously handled aggregate ID string conversion and event reconstruction via reflection, but are no longer part of the codebase.

src/Prooph/EventStore/Adapter/Builder · high confidence

Updated CI configuration and added static analysis tooling

The project's continuous integration setup has been modernized: the Travis CI configuration now targets PHP 7.4 and 8.0, includes a build matrix for lowest/stable dependencies, and integrates Psalm for static analysis and php-cs-fixer for code style checks. Additionally, a new \.coveralls.yml\ file was added to configure code coverage reporting, and the \phpunit.xml.dist\ configuration was updated to enable error-to-exception conversion for more robust test execution.

(repo-wide) · high confidence

Test coverage

Added test coverage for DateTimeStringBugWorkaround; Removed ZF2 Event Store adapter tests; Removed legacy test bootstrap and configuration files; Removed mock domain classes from test suite; Removed obsolete EventSourcingRepositoryTest; Removed obsolete test for AggregateRootDecorator; Removed obsolete test suite for the Prooph EventStore.

Dependencies

Drops PHP 5.4-8.0 support and modernizes dependencies

The project now requires PHP 8.1 or higher, removing support for all previous PHP versions. Dependencies have been significantly updated: 'ramsey/uuid' is updated to ^3.9.3, 'phpunit/phpunit' to ^9.6 \|\| ^10.0, and 'doctrine/instantiator' to ^1.4 \|\| ^2.0. Additionally, 'amphp/amp' is added as a dev dependency, and the 'zendframework' packages are removed entirely. The autoload configuration is also updated from PSR-0 to PSR-4.

(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 64 → 64 (-0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 98 → 98 (-0.3)
  • Maturity 43 → 43 (+0.0)
  • Readiness 67 → 67 (+0.0)
  • Security 95 → 95 (+0.0)

Resolved (5)

  • Documentation: no usage examples (README.md)
  • Similar to the read methods, there are four subscription methods differing by scope (Stream/All) and mode (Live/FromCheckpoint). The return types also differ (EventStoreSubscription vs EventStoreCatchUpSubscription), forcing the caller to know the exact method signature to handle the return type correctly.
  • The API exposes four distinct methods for reading events that differ only by stream scope (All vs Stream) and direction (Forward vs Backward). This creates a combinatorial explosion of methods (4) for a single logical operation (reading a slice of events).
  • The PersistentSubscription class exposes 8 methods for acknowledging and failing events, covering combinations of single/multiple and object/ID. This is a classic API bloat issue where the same logical operation (ack/nack) is repeated for different input types.
  • There is a duplication of intent between 'Raw' and 'Structured' metadata operations. While the data types differ (string vs object), the method naming pattern setStreamMetadata vs setRawStreamMetadata is inconsistent with standard library patterns which usually prefer a single method with an optional format flag or distinct domain objects. More critically, getStreamMetadata returns a StreamMetadataResult wrapper, while getRawStreamMetadata returns RawStreamMetadataResult. The parallelism is good, but the existence of two completely separate code paths for metadata (one typed, one raw string) without a unified interface or clear distinction in usage complexity is confusing.

New (1)

  • Documentation: no build, run or usage example (README.md)

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

Survey your own repository

prooph/event-store 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 16ba277f17e34b46b12810954840fabaadeded34 — 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.4+preprod-464a0040a931.