Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CommitOrderCalculator and related classes #10967

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ avoided.
When using database-provided, auto-incrementing IDs, this may lead to IDs being assigned
to entities in a different order than it was previously the case.

## Deprecated `\Doctrine\ORM\Internal\CommitOrderCalculator` and related classes

With changes made to the commit order computation, the internal classes
`\Doctrine\ORM\Internal\CommitOrderCalculator`, `\Doctrine\ORM\Internal\CommitOrder\Edge`,
`\Doctrine\ORM\Internal\CommitOrder\Vertex` and `\Doctrine\ORM\Internal\CommitOrder\VertexState`
have been deprecated and will be removed in ORM 3.0.

## Deprecated returning post insert IDs from `EntityPersister::executeInserts()`

Persisters implementing `\Doctrine\ORM\Persisters\Entity\EntityPersister` should no longer
Expand Down
46 changes: 0 additions & 46 deletions lib/Doctrine/ORM/Internal/CommitOrder/Edge.php

This file was deleted.

49 changes: 0 additions & 49 deletions lib/Doctrine/ORM/Internal/CommitOrder/Vertex.php

This file was deleted.

28 changes: 0 additions & 28 deletions lib/Doctrine/ORM/Internal/CommitOrder/VertexState.php

This file was deleted.

177 changes: 0 additions & 177 deletions lib/Doctrine/ORM/Internal/CommitOrderCalculator.php

This file was deleted.

15 changes: 2 additions & 13 deletions lib/Doctrine/ORM/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use Doctrine\ORM\Exception\ORMException;
use Doctrine\ORM\Exception\UnexpectedAssociationValue;
use Doctrine\ORM\Id\AssignedGenerator;
use Doctrine\ORM\Internal\CommitOrderCalculator;
use Doctrine\ORM\Internal\HydrationCompleteHandler;
use Doctrine\ORM\Internal\TopologicalSort;
use Doctrine\ORM\Mapping\ClassMetadata;
Expand Down Expand Up @@ -1682,11 +1681,11 @@ public function addToIdentityMap($entity)
clearing the EntityManager;
- you might have been using EntityManager#getReference() to create a reference
for a nonexistent ID that was subsequently (by the RDBMS) assigned to another
entity.
entity.

Otherwise, it might be an ORM-internal inconsistency, please report it.

To opt-in to the new exception, call
To opt-in to the new exception, call
\Doctrine\ORM\Configuration::setRejectIdCollisionInIdentityMap on the entity
manager's configuration.
EXCEPTION
Expand Down Expand Up @@ -2721,16 +2720,6 @@ public function lock($entity, int $lockMode, $lockVersion = null): void
}
}

/**
* Gets the CommitOrderCalculator used by the UnitOfWork to order commits.
*
* @return CommitOrderCalculator
*/
public function getCommitOrderCalculator()
{
return new Internal\CommitOrderCalculator();
}

/**
* Clears the UnitOfWork.
*
Expand Down
6 changes: 0 additions & 6 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,6 @@
<code>getTableHiLoUpdateNextValSql</code>
</UndefinedMethod>
</file>
<file src="lib/Doctrine/ORM/Internal/CommitOrderCalculator.php">
<RedundantCondition>
<code><![CDATA[$vertex->state !== VertexState::VISITED]]></code>
<code><![CDATA[$vertex->state !== VertexState::VISITED]]></code>
</RedundantCondition>
</file>
<file src="lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php">
<DeprecatedClass>
<code>IterableResult</code>
Expand Down
4 changes: 0 additions & 4 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
<referencedClass name="Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper"/>
<referencedClass name="Doctrine\ORM\Tools\Console\EntityManagerProvider\HelperSetManagerProvider"/>
<referencedClass name="Doctrine\ORM\Internal\CommitOrder\Edge"/>
<referencedClass name="Doctrine\ORM\Internal\CommitOrder\Vertex"/>
<referencedClass name="Doctrine\ORM\Internal\CommitOrder\VertexState"/>
<referencedClass name="Doctrine\ORM\Internal\CommitOrderCalculator"/>
</errorLevel>
</DeprecatedClass>
<DeprecatedConstant>
Expand Down
Loading