You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* First implementation for MongoDB\BSON\Value
* Add is* methods to MongoDB\BSON\Value
* Extract functions to create BSON instances
* Add getters for all BSON types
* Apply code review feedback
* Rename BSON factory functions
* Return bool in BSON factories
* Clean up int64 compatibility macro includes
* Use macro to throw unexpected BSON type exceptions
* Extract int64 tests for BSON value
* Add error test for BSON value factory
* Implement debug output for BSON value instances
* Remove object comparison handler
* Implement tests for cloning BSON value instances
* Add tests for isInt and getInt
* Ensure stdbool.h is included for compat macros
* Refactor phongo_bson_value_to_zval
The new implementation no longer uses a bson_iter_t for simple values, but instantiates BSON objects directly. Arrays and documents are still passed to php_phongo_bson_to_zval_ex for convenience.
* Refactor phongo_zval_to_bson_value
* Return bson_value_t instances in BSON iterator
* Return bson_value_t instances in Document::get
* Return bson_value_t instances in PackedArray::get
* Return BSON type instances in bson_value_t
This includes a small change to return PHP objects for compatibility in ClientEncryption::decrypt and ClientEncryption::encrypt
* Remove obsolete php_phongo_bson_iter_to_zval function
* Use PHP values in debug output
* Comprehensively test all BSON types
* Implement serialisation of BSON Value instances
* Drop isInt and getInt methods from BSON value class
* Always return int64 instances in Value::getInt64
* Update serialisation and debug info for BSON classes
With the new logic, debug output will always show raw BSON data and PHP data for documents and packed arrays. Serialised data will only contain raw BSON data. This also changes Int64 serialisation to always serialise as Int64 instances, regardless of value or platform.
* Create Int64 instances directly
* Add comment explaining extra property in get_debug_info
* Clarify exception message when initialising Value instance
* Simplify invocations of get_properties_hash with string type
* Handle zval conversion error in get_properties_hash
* Add comment noting phongo_bson_value_to_zval will throw
* Fix zval capitalisation
* Handle bson value conversion error on serialisation
* Document exceptions when converting values to zval
* Clean up unused macros
* Add missing __set_state methods
* Test MongoDB\BSON\Value::__set_state()
* Skip __set_state test on PHP 7.2
* Change docblock to regular comment
* Use new BSON value conversion function when encrypting data
Since the encrypted data will always be a BSON binary object, there is no reason to use the legacy function to avoid receiving a Document or PackedArray instance.
0 commit comments