Skip to content

Commit 4f4ed2f

Browse files
committed
Deprecate methods for configuring no longer configurable features
In 3.0.0, it is no longer possible to disable lazy ghost objects, and likewise, it is no longer possible to disable rejecting id collisions in the identity map, so let us deprecate the related methods. I was supposed to do this in 3.1.0.
1 parent 4664373 commit 4f4ed2f

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

UPGRADE.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Upgrade to 3.5
2+
3+
## Deprecate methods for configuring no longer configurable features
4+
5+
Since 3.0, lazy ghosts are enabled unconditionally, and so is rejecting ID
6+
collisions in the identity map.
7+
8+
As a consequence, the following methods are deprecated and will be removed in 4.0:
9+
* `Doctrine\ORM\Configuration::setLazyGhostObjectEnabled()`
10+
* `Doctrine\ORM\Configuration::isLazyGhostObjectEnabled()`
11+
* `Doctrine\ORM\Configuration::setRejectIdCollisionInIdentityMap()`
12+
* `Doctrine\ORM\Configuration::isRejectIdCollisionInIdentityMapEnabled()`
13+
114
# Upgrade to 3.4
215

316
## Discriminator Map class duplicates
@@ -26,7 +39,7 @@ The class `Doctrine\ORM\Mapping\Driver\DatabaseDriver` is deprecated without rep
2639

2740
Output walkers should implement the new `\Doctrine\ORM\Query\OutputWalker` interface and create
2841
`Doctrine\ORM\Query\Exec\SqlFinalizer` instances instead of `Doctrine\ORM\Query\Exec\AbstractSqlExecutor`s.
29-
The output walker must not base its workings on the query `firstResult`/`maxResult` values, so that the
42+
The output walker must not base its workings on the query `firstResult`/`maxResult` values, so that the
3043
`SqlFinalizer` can be kept in the query cache and used regardless of the actual `firstResult`/`maxResult` values.
3144
Any operation dependent on `firstResult`/`maxResult` should take place within the `SqlFinalizer::createExecutor()`
3245
method. Details can be found at https://github.com/doctrine/orm/pull/11188.

src/Configuration.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ public function enableNativeLazyObjects(bool $nativeLazyObjects): void
610610
}
611611

612612
/**
613-
* To be deprecated in 3.1.0
613+
* @deprecated lazy ghost objects are always enabled
614614
*
615615
* @return true
616616
*/
@@ -619,7 +619,7 @@ public function isLazyGhostObjectEnabled(): bool
619619
return true;
620620
}
621621

622-
/** To be deprecated in 3.1.0 */
622+
/** @deprecated lazy ghost objects cannot be disabled */
623623
public function setLazyGhostObjectEnabled(bool $flag): void
624624
{
625625
if (! $flag) {
@@ -630,7 +630,7 @@ public function setLazyGhostObjectEnabled(bool $flag): void
630630
}
631631
}
632632

633-
/** To be deprecated in 3.1.0 */
633+
/** @deprecated rejecting ID collisions in the identity map cannot be disabled */
634634
public function setRejectIdCollisionInIdentityMap(bool $flag): void
635635
{
636636
if (! $flag) {
@@ -642,7 +642,7 @@ public function setRejectIdCollisionInIdentityMap(bool $flag): void
642642
}
643643

644644
/**
645-
* To be deprecated in 3.1.0
645+
* @deprecated rejecting ID collisions in the identity map is always enabled
646646
*
647647
* @return true
648648
*/

0 commit comments

Comments
 (0)