mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 17:33:15 +02:00
[PR #12249] [MERGED] Add dispatchPreFlushEvent() method and avoid calling getConnection() twice
#13617
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/12249
Author: @carferdas
Created: 10/28/2025
Status: ✅ Merged
Merged: 12/30/2025
Merged by: @derrabus
Base:
3.7.x← Head:refactor/small-refactor-method-commit-move-dispatch-pre-flush-event📝 Commits (1)
15054e3refactor: add dispatchPreFlushEvent method and avoid calling getConnection twice📊 Changes
1 file changed (+12 additions, -9 deletions)
View changed files
📝
src/UnitOfWork.php(+12 -9)📄 Description
Added a new method
dispatchPreFlushEventto align with existing methods likedispatchOnFlushEventanddispatchPostFlushEvent.Removed a redundant call to
$this->em->getConnection()since the connection is already obtained earlier, avoiding unnecessary duplicate calls.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.