-
Notifications
You must be signed in to change notification settings - Fork 676
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
Update method signatures for ext-mongodb 1.20 #11109
base: 5.x
Are you sure you want to change the base?
Conversation
{ | ||
} | ||
|
||
public function getId(bool $asInt64 = false): Int64|CursorId |
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.
You can improve the return type. The default return type change in 2.0. If we could specify the return type depending on the ext-mongodb version, that would be nice.
public function getId(bool $asInt64 = false): Int64|CursorId | |
/** @return ($asInt64 is true ? Int64 : CursorId) */ | |
public function getId(bool $asInt64 = false): Int64|CursorId |
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.
I thought I already had this in, but I didn't add it in our own stubs. It's added now 👍
could you rebase on 6.x? |
@orklah sorry for the late reply. Do we still need to maintain CallMap entries, or do we only need the stubs for 6.x? I noticed that the file is no longer there. |
The file was moved, see https://psalm.dev/docs/contributing/editing_callmaps/ |
This includes a tiny fix for the template annotation in
MongoDB\BSON\Iterator
, as well as updates to the stubs forMongoDB\Driver\CursorInterface
andMongoDB\Driver\Cursor
to prepare for the upcoming 2.0 release.