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.
Package identity and scope
pixelfederation/doctrine-resettable-em-bundle is a Symfony bundle, not a Laravel package. It wraps Doctrine ORM's EntityManager in a ResettableEntityManager decorator and resets it at safe boundaries: a Symfony Messenger middleware (ResetEntityManagerMiddleware) and a console-event listener that resets after each command run.Architecture fit
doctrine.orm.entity_manager plus auto-registered middleware — near-zero application code, and the reset semantics are opinionated in the right direction (clear after the unit of work, not mid-transaction).laravel-doctrine the bundle's service wiring depends on Symfony's DI compiler passes, FrameworkBundle conventions, and Messenger's middleware interface. You cannot install it meaningfully in a Laravel app.EntityManager, call clear()/isOpen()-and-reopen after each queued job, and register it as a decorator in a service provider plus a queue-event hook. That is a "borrow the design, not the package" decision, and it should be made explicitly rather than assumed.Integration feasibility
composer require plus enabling the bundle; the middleware is registered automatically when Messenger is present. Effort is measured in minutes.Technical risk
Key questions
symfony/* to ^8.1, or an added CI matrix entry? Is a 11.0.x patch available if we need to stay on Symfony 7?Stack fit
EntityManager proxy and a queue-lifecycle hook (JobProcessed/JobFailed or a middleware in the queue pipeline) — into a first-party package.Migration path
composer update, no code changes, no data migration, no config migration. Revert is equally trivial.Compatibility
EntityManagerInterface, and ORM 2 vs 3 differences in clear() and repository behavior can bite.Sequencing
Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?