-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Comparing changes
Open a pull request
base repository: doctrine/orm
base: 2.16.0
head repository: doctrine/orm
compare: 2.16.1
- 10 commits
- 22 files changed
- 6 contributors
Commits on Aug 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 710dde8 - Browse repository at this point
Copy the full SHA 710dde8View commit details
Commits on Aug 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for eeefc6b - Browse repository at this point
Copy the full SHA eeefc6bView commit details -
Fix UnitOfWork->originalEntityData is missing not-modified collection…
…s after computeChangeSet (#9301) * Fix original data incomplete after flush * Apply suggestions from code review Co-authored-by: Alexander M. Turek <[email protected]> --------- Co-authored-by: Alexander M. Turek <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f50803c - Browse repository at this point
Copy the full SHA f50803cView commit details -
Add possibility to set reportFieldsWhereDeclared to true in ORMSetup (#…
…10865) Otherwise it is impossible to avoid a deprecation warning when using ORMSetup::createAttributeMetadataConfiguration()
Configuration menu - View commit details
-
Copy full SHA for fd0bdc6 - Browse repository at this point
Copy the full SHA fd0bdc6View commit details
Commits on Aug 4, 2023
-
Turn identity map collisions from exception to deprecation notice (#1…
…0878) In #10785, a check was added that prevents entity instances from getting into the identity map when another object for the same ID is already being tracked. This caused regressions for users that work with application-provided IDs and expect this condition to fail with `UniqueConstraintViolationExceptions` when flushing to the database. Thus, this PR turns the exception into a deprecation notice. Users can opt-in to the new behavior. In 3.0, the exception will be used. Implements #10871.
Configuration menu - View commit details
-
Copy full SHA for a616914 - Browse repository at this point
Copy the full SHA a616914View commit details
Commits on Aug 9, 2023
-
Fix broken changeset computation for entities loaded through fetch=EA…
…GER + using inheritance (#10884) #10880 reports a case where the changes from #10785 cause entity updates to be missed. Upon closer inspection, this change seems to be causing it: https://github.com/doctrine/orm/pull/10785/files#diff-55a900494fc8033ab498c53929716caf0aa39d6bdd7058e7d256787a24412ee4L2990-L3003 The code was changed to use `registerManaged()` instead, which basically does the same things, but (since #10785) also includes an additional check against duplicate entity instances. But, one detail slipped through tests and reviews: `registerManaged()` also updates `\Doctrine\ORM\UnitOfWork::$originalEntityData`, which is used to compute entity changesets. An empty array `[]` was passed for $data here. This will make the changeset computation assume that a partial object was loaded and effectively ignore all field updates here: https://github.com/doctrine/orm/blob/a616914887ea160db4158d2c67752e99624f7c8a/lib/Doctrine/ORM/UnitOfWork.php#L762-L764 I think that, effectively, it is sufficient to call `registerManaged()` only in the two cases where a proxy was created. Calling `registerManaged()` with `[]` as data for a proxy object is consistent with e. g. `\Doctrine\ORM\EntityManager::getReference()`. In the case that a full entity has to be loaded, we need not call `registerManaged()` at all, since that will already happen inside `EntityManager::find()` (or, more specifically, `UnitOfWork::createEntity()` called inside it). Note that the test case has to make some provisions so that we actually reach this case: * Load an entity that uses `fetch="EAGER"` on a to-one association * That association being against a class that uses inheritance (why's that?)
Configuration menu - View commit details
-
Copy full SHA for 440b244 - Browse repository at this point
Copy the full SHA 440b244View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16c0151 - Browse repository at this point
Copy the full SHA 16c0151View commit details -
Use a dedicated exception for the check added in #10785 (#10881)
This adds a dedicated exception for the case that objects with colliding identities are to be put into the identity map. Implements #10872.
Configuration menu - View commit details
-
Copy full SHA for 6de4b68 - Browse repository at this point
Copy the full SHA 6de4b68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b220e3 - Browse repository at this point
Copy the full SHA 6b220e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 597a63a - Browse repository at this point
Copy the full SHA 597a63aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 2.16.0...2.16.1