PHPC-2206 introduced a BSON\Value class that was intended to make it easier to handle raw BSON values instead of dealing with PHP values that can lead to a loss of precision. Changes made during that change make it easier for us to handle that case.
Instead of returning a BSON\Value instance, BSON\Document::get, BSON\PackedArray::get, and BSON\Iterator::current can return the underlying value (i.e. the value returned in BSON\Value::getValue), eliminating the need for special handling whenever working with raw BSON data. Since BSON\Value::getValue always returns a BSON\Int64 instance for BSON long values (even on 64-bit platforms), this resolves the original problem of losing precision.
- has to be done before
-
PHPC-2243 Remove BSON\Value class
- Closed