prooph/event-store
Common interfaces and classes for Prooph Event Store implementations. Provides the core building blocks to work with event stores, with persistent implementations available via separate TCP and HTTP client packages. Supports PHP 7.4+ (v7).
Event Sourcing Pattern Alignment (Unchanged, but with updated context)
Domain-Driven Design (DDD) Synergy (Unchanged)
PHP Ecosystem Compatibility (Updated)
Laravel-Specific Considerations (Unchanged, but with caveat)
| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Schema Management | High | Roave BC Checker must be integrated into CI/CD to catch incompatible event schema changes. |
| Test Suite Breaks | Medium | Audit and refactor custom test classes extending renamed prooph abstract classes. |
| PHPUnit Version | Low | Laravel’s default PHPUnit (v10+) is now compatible; no action needed unless using legacy versions. |
| Event Versioning | High | BC checks reduce but do not eliminate risk; manual review of event migrations remains critical. |
| Projection Lag | High | Unchanged; compensating transactions or idempotent projections still required. |
| Vendor Lock-in | Low | BSD-3-Clause license unchanged; prooph remains well-maintained. |
AbstractEventStoreTest)?Core Stack Compatibility:
Optional Integrations (Unchanged)
| Phase | Task | Tools/Libraries | New Considerations |
|---|---|---|---|
| Assessment | Audit existing event logs and define aggregate roots and event schemas. | Custom scripts, prooph/event-store CLI | Run Roave BC Checker on existing events. |
| Proof of Concept | Implement a single aggregate with event store and projections. | prooph/event-store, Laravel Artisan | Refactor tests if using renamed abstract classes. |
| Core Integration | Replace legacy persistence with prooph/event-store for critical aggregates. | Laravel Service Container, Migrations | Add Roave BC Checker to CI/CD. |
| Read Models | Build projections or separate read models. | prooph/event-store projections, Laravel | Unchanged. |
| Observability | Add logging/metrics for event store operations. | Laravel Logging, Prometheus | Unchanged. |
| Rollout | Gradually migrate aggregates; feature flag event store usage. | spatie/laravel-feature-flags | Validate BC compliance during rollout. |
Laravel-Specific Workarounds (Unchanged, but with testing note)
AbstractEventStoreTest), rename or extend new classes (e.g., prooph/event-store-test-case).Avoid (Updated)
php-cs-fixer or GitHub Actions:
# Example GitHub Actions step
- name: Check backward compatibility
run: vendor/bin/roave-bc-check analyze --dir=src --config=bc-config.php
EventStoreDebugger and Laravel’s logging for observability.| Failure Mode | Impact | Mitigation |
|---|---|---|
| BC Checker Fails in CI | Blocks deployments. | Fix event schemas or suppress false positives with config. |
| Test Suite Breaks | Delays migration. | Refactor tests |
How can I help you explore Laravel packages today?