-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Various APIs in PHPLIB accept arrays and objects for document parameters.
Generally, these parameters are directly passed along to PHPC for BSON serialization. But in some cases, PHPLIB needs to inspect the document (e.g. differentiating update/replacement documents, generating index names). For example, when the object is an instance of MongoDB\BSON\Serializable we invoke bsonSerialize() and work with its return value. For other objects, get access the public properties with get_object_vars().
Starting with PHPC 1.16, applications may utilize MongoDB\BSON\Document and MongoDB\BSON\PackedArray objects to represent raw BSON documents and arrays, respectively.
We should ensure that Document is supported everywhere PHPLIB currently takes a document parameter.
Some APIs will also need to be sensitive to PackedArray objects. For example, Update operations may need check if the update array|object parameter is a pipeline; however, Aggregate operations will continue to require a PHP array for their pipeline argument so this wouldn't apply there.
- has to be done before
-
PHPLIB-892 Require crypt_shared and/or mongocryptd for tests utilizing enterprise CSFLE features
- Closed
- is depended on by
-
PHPLIB-881 Consolidate validation of aggregation pipeline options
- Closed
- is related to
-
PHPC-2216 BulkWrite::insert() does not generate _id for Document or PackedArray
- Closed
-
PHPC-326 Document and PackedArray classes to represent raw BSON data
- Closed
-
PHPLIB-878 Spec tests for queryable encryption range indexes
- Closed
- related to
-
PHPC-2229 Narrow Serializable::bsonSerialize() tentative return type from array|object to array|stdClass
- Backlog
-
PHPC-2222 PackedArray::fromPHP returns Document for root=bson type map
- Closed
-
PHPLIB-1129 Replace operations may inadvertently execute pipeline updates
- Closed
-
PHPLIB-1139 Refactor logic for various document casts in tests
- Backlog
-
PHPLIB-1128 Move generate_index_name() to private method within IndexInput
- Closed
-
PHPLIB-1146 Avoid multiple calls to document_to_array() during argument validation
- Backlog
-
PHPLIB-1137 Prohibit PackedArray objects where a document type is expected
- Closed