-
Type: Epic
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Done
-
Int64 Improvements
-
2
-
1
-
2
-
100
-
Summary
PHPC currently only uses Int64 objects when necessary, i.e. on 32-bit platforms to represent BSON int64 values that are beyond the range of 32-big signed integers. Whenever possible, BSON int64 values are returned as PHP integer types in the interest of usability. This design dates back to the legacy PHP driver.
This epic will collect various issues to improve usability when working with Int64 objects and BSON int64 types. It is meant to complement related tickets (e.g. PHPC-326, PHPC-2206) that will also grant users more control over reading/writing BSON and preserving types.
Motivation
Who is the affected end user?
Users that encounter Int64 objects or need to explicitly create BSON int64 types.
How likely is it that this problem or use case will occur?
32-bit PHP platforms are growing increasingly rare; however, MongoDB features such as CSFLE and JSON schema mean that users may be more likely to care about BSON types (particularly int32 and int64).
If the problem does occur, what are the consequences and how severe are they?
Users may encounter unexpected schema validation errors. BSON int64 types could be converted to int32 when round-tripping through PHP.
These are mostly minor annoyances and should not seriously affect data integrity, considering that PHP's logic mirrors the server's own behavior of encoding integer values as int32 whenever possible.
Cast of Characters
Engineering Lead:
Document Author:
POCers:
Product Owner:
Program Manager:
Stakeholders: