pixelfederation/doctrine-resettable-em-bundle
Symfony bundle that provides a resettable Doctrine EntityManager, letting applications recover from closed or failed managers after database exceptions and continue handling requests and background work reliably.
EntityManager is reset between messages/jobs. That directly supports roadmap decisions about queue consumers, daemons, and batch jobs: it lets us keep processes alive for throughput without accepting unbounded memory growth or stale identity maps.EntityManager::clear() / reset semantics plus a listener). The buy decision is really "maintained, config-driven policy vs. hand-rolled listener code duplicated per service." 11.1.0 adding Symfony 8.1 support tilts this toward buy: we get upstream compatibility tracking for free.Consider it when:
EntityManager: Symfony Messenger consumers, queue workers, daemons, batch importers, or functional test suites that reset between tests.Look elsewhere when:
EntityManager and Symfony's DI/kernel. It is not a drop-in for Laravel. For Laravel, use the framework's own lifecycle levers: DB::purge, Model::clearBootedModels, queue --memory / --max-jobs, or worker restart strategies.For executives: This is low-cost plumbing that makes long-running background workers behave like freshly started processes. It buys down a recurring class of production failures — memory exhaustion and stale data in workers — and supports our throughput and cost-per-job goals without new infrastructure. The new release, 11.1.0, is a maintenance-compatibility update only: Symfony 8.1 support, no breaking changes, no migration work. That tells us the dependency is actively maintained and won't block our framework upgrade path. Recommend adopting where we already run Symfony/Doctrine workers; it is not applicable to our Laravel services.
For engineering: 11.1.0 is a single compatibility change — Symfony 8.1 support (PR #500) on top of 11.0.0 — with no API changes, no deprecations, and no config changes. The bump is routine and safe. The value is a standardized, config-driven reset policy in place of N hand-rolled EntityManager::clear() call sites with inconsistent thresholds, plus continued upstream support for the Symfony versions on our matrix. Be explicit about scope: this is a Symfony/Doctrine bundle, not a Laravel package — for Laravel + Eloquent services we should solve worker lifecycle with the framework's own options rather than pulling this in.
How can I help you explore Laravel packages today?