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

Allow Partial for Non-Object Hydration #10920

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
Next Next commit
Update Parser.php
raziel057 authored Aug 24, 2023

Verified

This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
commit 00b8bb0a714228f8ae899285dcc36b9d35ba6d57
12 changes: 7 additions & 5 deletions lib/Doctrine/ORM/Query/Parser.php
Original file line number Diff line number Diff line change
@@ -1844,11 +1844,13 @@ public function JoinAssociationDeclaration()
*/
public function PartialObjectExpression()
{
Deprecation::trigger(
'doctrine/orm',
'https://github.com/doctrine/orm/issues/8471',
'PARTIAL syntax in DQL is deprecated.'
);
if ($this->query === AbstractQuery::HYDRATE_OBJECT || $this->query === AbstractQuery::HYDRATE_SIMPLEOBJECT) {
Deprecation::trigger(
'doctrine/orm',
'https://github.com/doctrine/orm/issues/8471',
'PARTIAL syntax for object hydration (mode HYDRATE_OBJECT or HYDRATE_SIMPLEOBJECT) in DQL is deprecated.'
);
}

$this->match(Lexer::T_PARTIAL);