Closed
Description
Description
Currently, Doctrine event listeners are instantiated in order to create the Doctrine event manager. You can fix this by adding a lazy=true
option to your service (this feature was added 6+ years ago). Could we just always make this lazy? This would solve issues during cache building, where all of the listeners are instantiated.
Relevant code:
Especially if we refactored the ContainerAwareEventManager to accept a service locator (instead of the entire container), this would be an easy win: we wouldn't even need to make the original definitions public anymore (which is the only downside).