Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: doctrine/orm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.16.0
Choose a base ref
...
head repository: doctrine/orm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.16.1
Choose a head ref
  • 10 commits
  • 22 files changed
  • 6 contributors

Commits on Aug 1, 2023

  1. Configuration menu
    Copy the full SHA
    710dde8 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Configuration menu
    Copy the full SHA
    eeefc6b View commit details
    Browse the repository at this point in the history
  2. 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]>
    olsavmic and derrabus authored Aug 2, 2023
    Configuration menu
    Copy the full SHA
    f50803c View commit details
    Browse the repository at this point in the history
  3. Add possibility to set reportFieldsWhereDeclared to true in ORMSetup (#…

    …10865)
    
    Otherwise it is impossible to avoid a deprecation warning when using ORMSetup::createAttributeMetadataConfiguration()
    W0rma authored Aug 2, 2023
    Configuration menu
    Copy the full SHA
    fd0bdc6 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

  1. 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.
    mpdude authored Aug 4, 2023
    Configuration menu
    Copy the full SHA
    a616914 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. 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?)
    mpdude authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    440b244 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16c0151 View commit details
    Browse the repository at this point in the history
  3. 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.
    mpdude authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    6de4b68 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b220e3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    597a63a View commit details
    Browse the repository at this point in the history
Loading