mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
PostFlush event is dispatched before unitofwork is cleanup #6723
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexander-schranz on GitHub (May 17, 2021).
Currently the postflush event is dispatched before the unitofwork is cleanup. We tried to add some listener to it but got into some problems because the
UnitOfWorkwas not yet cleanup. The code can be found here:3a194ad699/lib/Doctrine/ORM/UnitOfWork.php (L378-L380)3a194ad699/lib/Doctrine/ORM/UnitOfWork.php (L472-L474)For our case it would be great if the
UnitOfWorkcleanup is done before dispatching the post events e.g.:I understand that this could be a bc break so an alternative would be add a new
postFlushCleanupevent which we could listen to it. What do you think?