Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Event Store Doctrine Adapter

Event Store Doctrine Adapter Laravel Package

prooph/event-store-doctrine-adapter

Doctrine DBAL adapter for Prooph Event Store. Stores and loads event streams using Doctrine connections, with support for transactional appends and stream persistence in relational databases. Useful for event-sourced PHP/Laravel apps needing DB-backed storage.

Deep Wiki
Context7

prooph/event-store-doctrine-adapter is a Doctrine DBAL/ORM adapter for the Prooph Event Store, letting you persist and load event streams using familiar Doctrine connections and tooling. It bridges Prooph’s event-sourcing model with relational databases while keeping the event store API intact.

Ideal for PHP/Laravel apps that want event sourcing without giving up Doctrine, it provides a clean integration layer and database-specific optimizations.

  • Doctrine DBAL-backed persistence for event streams
  • Supports common RDBMS platforms via Doctrine drivers
  • Transaction-safe appends and consistent stream loading
  • Schema/metadata support aligned with Prooph conventions
  • Extensible for custom table layouts and serialization
Frequently asked questions about Event Store Doctrine Adapter
Does prooph/event-store-doctrine-adapter work with Laravel 10 and PHP 8.1+?
The package’s last release was in 2016, so it may not natively support PHP 8.1 or Laravel 10. You’ll likely need to patch dependencies like Doctrine DBAL 3.x and Prooph’s core packages. Test thoroughly for compatibility with Laravel’s query builder and type system.
How do I integrate this adapter into a Laravel application?
Install the required packages (`prooph/event-store`, `prooph/event-store-doctrine-adapter`, and `doctrine/dbal`), then configure the adapter in a Laravel service provider. Use Doctrine’s DBAL connection to initialize the event store, and publish migrations for the event store tables.
Can I use this with Laravel’s Eloquent or Doctrine ORM?
This adapter works with Doctrine DBAL directly, so it’s compatible with Laravel’s native DBAL layer. If you’re using spatie/laravel-doctrine-orm, you can extend the adapter for ORM-based persistence, but the core package focuses on DBAL for simplicity.
Is transaction safety guaranteed in Laravel’s context?
The adapter supports transaction-safe appends, but Laravel’s transaction handling (e.g., nested transactions or DB::transaction) may introduce edge cases. Test with your specific workflows, especially if using event sourcing for critical business logic.
What databases does this adapter support?
It supports any RDBMS backed by Doctrine DBAL, including MySQL, PostgreSQL, and SQLite—aligning with Laravel’s multi-database support. Schema customization is possible, but ensure your chosen database meets Prooph’s event store requirements.
How do I handle event versioning or metadata with this package?
The adapter follows Prooph’s conventions for event versioning and metadata. You’ll need to define these in your event stream logic, but the package provides schema support aligned with Prooph’s expectations. Custom serialization is also extensible.
Are there performance concerns for high-throughput Laravel apps?
Event sourcing in RDBMS can be write-heavy, so benchmark your workload. Consider indexing strategies for event streams and optimize queries for replay. Laravel’s caching (e.g., Redis) can help with metadata or projections.
What alternatives exist for event sourcing in Laravel?
For simpler needs, Laravel’s native event system or spatie/laravel-event-sourcing may suffice. If you’re committed to Prooph, consider newer packages like `prooph/event-store-pdo` for a lighter alternative, though this adapter offers Doctrine integration.
How do I validate transaction integrity in Laravel?
Use Laravel’s `DB::transaction` or `try-catch` blocks to wrap event store operations. Test with rollback scenarios and verify that failed appends don’t corrupt your event streams. Consider unit tests with Laravel’s testing tools.
Is this package actively maintained? What are the risks?
The package hasn’t been updated since 2016, so risks include compatibility gaps with modern PHP/Laravel/Doctrine and unpatched security vulnerabilities. Assess whether the core Prooph packages are maintained and plan for potential backporting efforts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware