[PR #12249] [MERGED] Add dispatchPreFlushEvent() method and avoid calling getConnection() twice #13617

Open
opened 2026-01-22 16:17:47 +01:00 by admin · 0 comments
Owner

📋 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.xHead: refactor/small-refactor-method-commit-move-dispatch-pre-flush-event


📝 Commits (1)

  • 15054e3 refactor: 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 dispatchPreFlushEvent to align with existing methods like dispatchOnFlushEvent and dispatchPostFlushEvent.

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.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/12249 **Author:** [@carferdas](https://github.com/carferdas) **Created:** 10/28/2025 **Status:** ✅ Merged **Merged:** 12/30/2025 **Merged by:** [@derrabus](https://github.com/derrabus) **Base:** `3.7.x` ← **Head:** `refactor/small-refactor-method-commit-move-dispatch-pre-flush-event` --- ### 📝 Commits (1) - [`15054e3`](https://github.com/doctrine/orm/commit/15054e342e77912a84d8b7d06d7299aa12d9b80e) refactor: add dispatchPreFlushEvent method and avoid calling getConnection twice ### 📊 Changes **1 file changed** (+12 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/UnitOfWork.php` (+12 -9) </details> ### 📄 Description Added a new method `dispatchPreFlushEvent` to align with existing methods like `dispatchOnFlushEvent` and `dispatchPostFlushEvent`. Removed a redundant call to `$this->em->getConnection()` since the connection is already obtained earlier, avoiding unnecessary duplicate calls. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:17:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#13617