diff --git a/UPGRADE.md b/UPGRADE.md index a42be6a4378..df648b18465 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -8,10 +8,12 @@ change in behavior. Progress on this is tracked at https://github.com/doctrine/orm/issues/11624 . -## PARTIAL DQL syntax is undeprecated for non-object hydration +## PARTIAL DQL syntax is undeprecated -Use of the PARTIAL keyword is not deprecated anymore in DQL when used with a hydrator -that is not creating entities, such as the ArrayHydrator. +Use of the PARTIAL keyword is not deprecated anymore in DQL, because we will be +able to support PARTIAL objects with PHP 8.4 Lazy Objects and +Symfony/VarExporter in a better way. When we decided to remove this feature +these two abstractions did not exist yet. ## Deprecate `\Doctrine\ORM\Query\Parser::setCustomOutputTreeWalker()` diff --git a/src/Query/Parser.php b/src/Query/Parser.php index 7d0a0176f4e..7b50c2920ea 100644 --- a/src/Query/Parser.php +++ b/src/Query/Parser.php @@ -1852,14 +1852,6 @@ public function JoinAssociationDeclaration() */ public function PartialObjectExpression() { - if ($this->query->getHydrationMode() === Query::HYDRATE_OBJECT) { - Deprecation::trigger( - 'doctrine/orm', - 'https://github.com/doctrine/orm/issues/8471', - 'PARTIAL syntax in DQL is deprecated for object hydration.' - ); - } - $this->match(TokenType::T_PARTIAL); $partialFieldSet = []; diff --git a/src/UnitOfWork.php b/src/UnitOfWork.php index fa51983e309..a70411103c8 100644 --- a/src/UnitOfWork.php +++ b/src/UnitOfWork.php @@ -2920,15 +2920,6 @@ private function newInstance(ClassMetadata $class) */ public function createEntity($className, array $data, &$hints = []) { - if (isset($hints[SqlWalker::HINT_PARTIAL])) { - Deprecation::trigger( - 'doctrine/orm', - 'https://github.com/doctrine/orm/issues/8471', - 'Partial Objects are deprecated for object hydration (here entity %s)', - $className - ); - } - $class = $this->em->getClassMetadata($className); $id = $this->identifierFlattener->flattenIdentifier($class, $data);