Skip to content

PHPC-2220: Return int64 values for server connection ID #1418

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

Merged
merged 2 commits into from
May 10, 2023

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented May 4, 2023

PHPC-2220
Also fixes PHPC-1941 (using OP_MSG to authenticate if the server supports it) by using the new libmongoc version.

Due to BC constraints, the API of getServerConnectionId in the command events can't be changed and we're forced to return an int value here. For that reason, the methods now raise an E_WARNING if a 64-bit value is truncated on a 32-bit platform. This is in line with previous behaviour, where the value was also truncated. Values within the 32-bit range and all values on 64-bit platforms will be returned as integers.

alcaeus added 2 commits May 4, 2023 14:44
Due to BC constraints, we can't return 64-bit values on 32-bit platforms. On those platforms, the value will be truncated and an E_WARNING is raised to inform the user.
@alcaeus alcaeus self-assigned this May 4, 2023
@alcaeus alcaeus requested a review from jmikola May 4, 2023 13:21
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very much OK with the truncation warning, as we're doing that elsewhere in a few places. IMO this isn't an essential API on the same level of needing to preserve BSON types in user data.

@alcaeus alcaeus merged commit 7b6d77a into mongodb:master May 10, 2023
@alcaeus alcaeus deleted the phpc-2220 branch May 10, 2023 07:19
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.

2 participants