Skip to content

Conversation

alcaeus
Copy link
Contributor

@alcaeus alcaeus commented Oct 1, 2024

This includes a tiny fix for the template annotation in MongoDB\BSON\Iterator, as well as updates to the stubs for MongoDB\Driver\CursorInterface and MongoDB\Driver\Cursor to prepare for the upcoming 2.0 release.

{
}

public function getId(bool $asInt64 = false): Int64|CursorId
Copy link
Contributor

@GromNaN GromNaN Oct 1, 2024

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.

Suggested change
public function getId(bool $asInt64 = false): Int64|CursorId
/** @return ($asInt64 is true ? Int64 : CursorId) */
public function getId(bool $asInt64 = false): Int64|CursorId

https://psalm.dev/r/a064e6428e

Copy link
Contributor Author

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 👍

@orklah
Copy link
Collaborator

orklah commented Feb 16, 2025

could you rebase on 6.x?

@alcaeus
Copy link
Contributor Author

alcaeus commented Mar 7, 2025

@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.

@danog
Copy link
Collaborator

danog commented Mar 7, 2025

The file was moved, see https://psalm.dev/docs/contributing/editing_callmaps/

@alcaeus alcaeus changed the base branch from 5.x to 6.x May 28, 2025 08:33
@alcaeus
Copy link
Contributor Author

alcaeus commented May 28, 2025

Closing - re-opening for 2.0

@alcaeus alcaeus closed this May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants