dualmedia/doctrine-retry-bundle
Symfony bundle that wraps Doctrine transactions with automatic retries for deadlocks and transient DB errors. Configure optional nesting tracking, then call Retrier->execute() with a closure receiving the EntityManager to safely run retryable work.
Adopt if:
try/catch blocks or external tools (e.g., RabbitMQ retries).Look elsewhere if:
For Executives: "This bundle automates retries for database transactions in our Symfony app, reducing failures in critical workflows (e.g., payments, orders) without adding engineering overhead. It’s a lightweight, MIT-licensed solution that improves reliability—like an ‘undo/redo’ for failed database operations—while keeping our stack simple. Low risk, high upside for resilience."
For Engineering: *"The Doctrine Retry Bundle lets us wrap transactions in a retry mechanism with minimal code:
$this->retrier->execute(fn(EntityManager $em) => {
$em->lock($entity, LockMode::PESSIMISTIC_WRITE);
// ...operations that might deadlock
});
TransactionStartEvent) enable observability/extensions.How can I help you explore Laravel packages today?