File tree Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Expand file tree Collapse file tree 3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,16 @@ change in behavior.
88
99Progress on this is tracked at https://github.com/doctrine/orm/issues/11624 .
1010
11- ## PARTIAL DQL syntax is undeprecated for non-object hydration
11+ ## PARTIAL DQL syntax is undeprecated
1212
13- Use of the PARTIAL keyword is not deprecated anymore in DQL when used with a hydrator
14- that is not creating entities, such as the ArrayHydrator.
13+ Use of the PARTIAL keyword is not deprecated anymore in DQL, because we will be
14+ able to support PARTIAL objects with PHP 8.4 Lazy Objects and
15+ Symfony/VarExporter in a better way. When we decided to remove this feature
16+ these two abstractions did not exist yet.
17+
18+ WARNING: If you want to upgrade to 3.x and still use PARTIAL keyword in DQL
19+ with array or object hydrators, then you have to directly migrate to ORM 3.3.x or higher.
20+ PARTIAL keyword in DQL is not available in 3.0, 3.1 and 3.2 of ORM.
1521
1622## Deprecate ` \Doctrine\ORM\Query\Parser::setCustomOutputTreeWalker() `
1723
Original file line number Diff line number Diff line change @@ -1850,14 +1850,6 @@ public function JoinAssociationDeclaration()
18501850 */
18511851 public function PartialObjectExpression ()
18521852 {
1853- if ($ this ->query ->getHydrationMode () === Query::HYDRATE_OBJECT ) {
1854- Deprecation::trigger (
1855- 'doctrine/orm ' ,
1856- 'https://github.com/doctrine/orm/issues/8471 ' ,
1857- 'PARTIAL syntax in DQL is deprecated for object hydration. '
1858- );
1859- }
1860-
18611853 $ this ->match (TokenType::T_PARTIAL );
18621854
18631855 $ partialFieldSet = [];
Original file line number Diff line number Diff line change 4141use Doctrine \ORM \Persisters \Entity \JoinedSubclassPersister ;
4242use Doctrine \ORM \Persisters \Entity \SingleTablePersister ;
4343use Doctrine \ORM \Proxy \InternalProxy ;
44- use Doctrine \ORM \Query \SqlWalker ;
4544use Doctrine \ORM \Utility \IdentifierFlattener ;
4645use Doctrine \Persistence \Mapping \RuntimeReflectionService ;
4746use Doctrine \Persistence \NotifyPropertyChanged ;
@@ -2920,15 +2919,6 @@ private function newInstance(ClassMetadata $class)
29202919 */
29212920 public function createEntity ($ className , array $ data , &$ hints = [])
29222921 {
2923- if (isset ($ hints [SqlWalker::HINT_PARTIAL ])) {
2924- Deprecation::trigger (
2925- 'doctrine/orm ' ,
2926- 'https://github.com/doctrine/orm/issues/8471 ' ,
2927- 'Partial Objects are deprecated for object hydration (here entity %s) ' ,
2928- $ className
2929- );
2930- }
2931-
29322922 $ class = $ this ->em ->getClassMetadata ($ className );
29332923
29342924 $ id = $ this ->identifierFlattener ->flattenIdentifier ($ class , $ data );
You can’t perform that action at this time.
0 commit comments