Skip to content

Commit 1334162

Browse files
authored
Merge pull request #11989 from greg0ire/late-depr
Deprecate methods for configuring no longer configurable features
2 parents 4664373 + 68ec3eb commit 1334162

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

UPGRADE.md

Lines changed: 15 additions & 2 deletions
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.
@@ -137,7 +150,7 @@ WARNING: This was relaxed in ORM 3.2 when partial was re-allowed for array-hydra
137150
`Doctrine\ORM\Query::HINT_FORCE_PARTIAL_LOAD` are removed.
138151
- `Doctrine\ORM\EntityManager*::getPartialReference()` is removed.
139152

140-
## BC BREAK: Enforce ArrayCollection Type on `\Doctrine\ORM\QueryBuilder::setParameters(ArrayCollection $parameters)`
153+
## BC BREAK: Enforce ArrayCollection Type on `\Doctrine\ORM\QueryBuilder::setParameters(ArrayCollection $parameters)`
141154

142155
The argument $parameters can no longer be a key=>value array. Only ArrayCollection types are allowed.
143156

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)