-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
DevKit updates for 4.x branch #779
Conversation
9e293e3
to
41fb6f9
Compare
41fb6f9
to
a43cb2b
Compare
@@ -57,9 +60,6 @@ public function __clone() | |||
$this->queryBuilder = clone $this->queryBuilder; | |||
} | |||
|
|||
/** | |||
* @return Iterator<object> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdyt about this alternative @VincentLanglet ? the typehint for execute is already on the parent and it is already iterable so I don't think we need to add this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a solution until doctrine/mongodb-odm#2457 indeed.
@@ -119,8 +119,8 @@ public function testExecuteAllowsSorting(): void | |||
$proxyQuery->setSortBy([], ['fieldName' => 'name']); | |||
$proxyQuery->setSortOrder('DESC'); | |||
|
|||
/** @var array{array{name: string}} $result */ | |||
$result = $proxyQuery->execute()->toArray(); | |||
/** @var iterable<array{name: string}> $result */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you typehint the ProxyQuery as ProxyQuery<array{name: string}>
you won't have to typehint the result.
@@ -143,23 +143,26 @@ public function testExecuteAllowsSortingWithEmbedded(): void | |||
$proxyQuery->setSortBy([['fieldName' => 'embeddedDocument']], ['fieldName' => 'position']); | |||
$proxyQuery->setSortOrder('DESC'); | |||
|
|||
/** @var array{array{name: string}} $result */ | |||
$result = $proxyQuery->execute()->toArray(); | |||
/** @var iterable<array{name: string}> $result */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
The changelog from #778 should be added to this PR |
Done |
Changelog