[PR #1074] [MERGED] [DDC-3160] Alternate fix for DDC-2996 bug #9124

Closed
opened 2026-01-22 16:03:18 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/1074
Author: @zimmermanj42
Created: 6/26/2014
Status: Merged
Merged: 7/6/2014
Merged by: @Ocramius

Base: masterHead: DDC-3160


📝 Commits (3)

  • a5cf641 Add failing test for DDC-3160
  • 65e7cc9 [DDC-3160] Change to fix that was implemented for DDC-2996.
  • 6a48675 Fix test issues.

📊 Changes

2 files changed (+79 additions, -8 deletions)

View changed files

📝 lib/Doctrine/ORM/UnitOfWork.php (+9 -8)
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3160Test.php (+70 -0)

📄 Description

The fix implemented for DDC-2996 seems to have broken quite a bit of code outside of Doctrine (for instance, the popular DoctrineExtensions project).

I'm not too well versed in Doctrine internals, but looking at the fix, I found it odd that an entity would live in both the insertion and update tracking in the unit of work.

This implementation should fix the case described in DDC-2996, while not creating any side effects with objects that are scheduled to be inserted.

I've ran this test with the Doctrine test suite and have also tested this change with the DoctrineExtensions project; unless I'm doing something wrong, it seems to have good results.

Again, I'm not too well versed in the inner workings of Doctrine, but I did a little research, poked around some code, and came up with this.


🔄 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/1074 **Author:** [@zimmermanj42](https://github.com/zimmermanj42) **Created:** 6/26/2014 **Status:** ✅ Merged **Merged:** 7/6/2014 **Merged by:** [@Ocramius](https://github.com/Ocramius) **Base:** `master` ← **Head:** `DDC-3160` --- ### 📝 Commits (3) - [`a5cf641`](https://github.com/doctrine/orm/commit/a5cf6417b3048aa6e1336e496556de453580b25f) Add failing test for DDC-3160 - [`65e7cc9`](https://github.com/doctrine/orm/commit/65e7cc9143e818670cae6a7167c3c70736fa870a) [DDC-3160] Change to fix that was implemented for DDC-2996. - [`6a48675`](https://github.com/doctrine/orm/commit/6a4867512e0d361ad6894a286cb7803682154616) Fix test issues. ### 📊 Changes **2 files changed** (+79 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+9 -8) ➕ `tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3160Test.php` (+70 -0) </details> ### 📄 Description The fix implemented for DDC-2996 seems to have broken quite a bit of code outside of Doctrine (for instance, the popular DoctrineExtensions project). I'm not too well versed in Doctrine internals, but looking at the fix, I found it odd that an entity would live in both the insertion and update tracking in the unit of work. This implementation should fix the case described in DDC-2996, while not creating any side effects with objects that are scheduled to be inserted. I've ran this test with the Doctrine test suite and have also tested this change with the DoctrineExtensions project; unless I'm doing something wrong, it seems to have good results. Again, I'm not too well versed in the inner workings of Doctrine, but I did a little research, poked around some code, and came up with this. --- <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:03:18 +01:00
admin closed this issue 2026-01-22 16:03:18 +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#9124