desarrolla2/doctrine-mirror-bundle
doctrine/dbal or doctrine/orm for hybrid stacks), this could integrate. For pure Eloquent apps, zero fit without heavy refactoring.doctrine/dbal + custom repositories: Medium effort (adapt to ORM).symfony/flex or humbucker/symfony-bundle. Compatibility unknown without testing.prePersist, postUpdate). Laravel’s Eloquent events (saving, saved) would need translation.replicas, read models, or event sourcing) suffice?doctrine/dbal).spatie/laravel-activitylog (for audit trails).| Component | Fit Level | Notes |
|---|---|---|
| Laravel Core | ❌ Poor | Bundle targets Symfony/Doctrine ORM; Eloquent apps need translation. |
| Doctrine ORM | ✅ Excellent | Native fit if already using ORM. |
| Symfony Bundle | ⚠️ Conditional | Requires humbucker/symfony-bundle or manual Symfony loader setup. |
| Database | ✅ Flexible | Works with any Doctrine-supported DB (MySQL, PostgreSQL, etc.). |
composer require desarrolla2/doctrine-mirror-bundle
config/app.php (if using Symfony loader) or via service provider.@Mirror(target="mirror_schema.entity")).use Desarrolla2\DoctrineMirrorBundle\Annotation\Mirror;
/**
* @Mirror(target="audit.user")
*/
class User {}
doctrine/dbal (~1.4).symfony/dependency-injection:3.x). Use composer why-not to audit.Log table).User, Order).mirror_last_updated_at column).| Failure Scenario | Impact | Mitigation Strategy |
|---|---|---|
| Mirror DB down | Primary writes blocked | Implement circuit breaker (fail open). |
| Schema mismatch | Mirror writes fail silently | Pre-deploy schema validation. |
| Network partition (OLTP ↔ Mirror) | Inconsistent data | Use transactional outbox pattern. |
| Doctrine event listener crash | Mirror lag | Supervisor + retry queue. |
| Primary DB failover | Mirror out of sync | Replication from primary’s replica. |
How can I help you explore Laravel packages today?