mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3052: [GH-989] Fix the problem when the lifecycle event can be triggered more then once... #3788
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 @doctrinebot on GitHub (Mar 26, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of dyangrev:
Url: https://github.com/doctrine/doctrine2/pull/989
Message:
We recently saw the postUpdate event get trigger multiple time incorrectly, it typically happens when flushing a set of entities persisted whose listener persist and flush another type of entity in it.
Php passes variables to foreach by value, for the function executeUpdates in the UnitOfWork, for example, entities in the $this->entityUpdates could be updated and unset in the listener of the first entity, while them will be updated and trigger listeners again when the process of first entity finishes (although they have already been unset from $this->entityUpdates). Similar for executeInsertion and executeDeletion.
@doctrinebot commented on GitHub (Jul 14, 2014):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-989] was closed:
https://github.com/doctrine/doctrine2/pull/989
@doctrinebot commented on GitHub (Jul 14, 2014):
Issue was closed with resolution "Invalid"