diff --git a/reference/mongodb/bson.xml b/reference/mongodb/bson.xml
index cb8db6de45..b16eba6cda 100644
--- a/reference/mongodb/bson.xml
+++ b/reference/mongodb/bson.xml
@@ -34,5 +34,9 @@
&reference.mongodb.bson.regexinterface;
&reference.mongodb.bson.timestampinterface;
&reference.mongodb.bson.utcdatetimeinterface;
+
+ &reference.mongodb.bson.dbpointer;
+ &reference.mongodb.bson.symbol;
+ &reference.mongodb.bson.undefined;
diff --git a/reference/mongodb/bson/dbpointer.xml b/reference/mongodb/bson/dbpointer.xml
new file mode 100644
index 0000000000..4b3699bb6b
--- /dev/null
+++ b/reference/mongodb/bson/dbpointer.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ The MongoDB\BSON\DBPointer class (deprecated)
+ MongoDB\BSON\DBPointer
+
+
+
+
+
+ &reftitle.intro;
+
+ BSON type for the "DBPointer" type. This BSON type is deprecated, and this
+ class can not be instantiated. It will be created from a BSON DBPointer
+ type while converting BSON to PHP, and can also be converted back into
+ BSON while storing documents in the database.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoDB\BSON\DBPointer
+
+
+
+
+ MongoDB\BSON\DBPointer
+
+
+
+ MongoDB\BSON\Type
+
+
+
+ Serializable
+
+
+
+ JsonSerializable
+
+
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+ &reference.mongodb.bson.entities.dbpointer;
+
+
+
+
diff --git a/reference/mongodb/bson/dbpointer/construct.xml b/reference/mongodb/bson/dbpointer/construct.xml
new file mode 100644
index 0000000000..59d2270d4b
--- /dev/null
+++ b/reference/mongodb/bson/dbpointer/construct.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+ MongoDB\BSON\DBPointer::__construct
+ Construct a new DBPointer (unused)
+
+
+
+ &reftitle.description;
+
+ finalprivateMongoDB\BSON\DBPointer::__construct
+
+
+
+ MongoDB\BSON\DBPointer objects are created through
+ conversion from a deprecated BSON type and cannot be constructed directly.
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+
+ &reftitle.seealso;
+
+ BSON Types
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/dbpointer/jsonserialize.xml b/reference/mongodb/bson/dbpointer/jsonserialize.xml
new file mode 100644
index 0000000000..9ddcb124ea
--- /dev/null
+++ b/reference/mongodb/bson/dbpointer/jsonserialize.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ MongoDB\BSON\DBPointer::jsonSerialize
+ Returns a representation that can be converted to JSON
+
+
+
+ &reftitle.description;
+
+ finalpublicmixedMongoDB\BSON\DBPointer::jsonSerialize
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns data which can be serialized by json_encode to
+ produce the extended
+ JSON representation of the MongoDB\BSON\DBPointer.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ JsonSerializable::jsonSerialize
+ json_encode
+ MongoDB Extended JSON
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/dbpointer/serialize.xml b/reference/mongodb/bson/dbpointer/serialize.xml
new file mode 100644
index 0000000000..c21dabfa54
--- /dev/null
+++ b/reference/mongodb/bson/dbpointer/serialize.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ MongoDB\BSON\DBPointer::serialize
+ Serialize a DBPointer
+
+
+
+ &reftitle.description;
+
+ finalpublicstringMongoDB\BSON\DBPointer::serialize
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the serialized representation of the
+ MongoDB\BSON\DBPointer.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ MongoDB\BSON\DBPointer::unserialize
+ serialize
+ Serializing Objects
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/dbpointer/tostring.xml b/reference/mongodb/bson/dbpointer/tostring.xml
new file mode 100644
index 0000000000..b1ee87f52e
--- /dev/null
+++ b/reference/mongodb/bson/dbpointer/tostring.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+ MongoDB\BSON\DBPointer::__toString
+ Returns an empty string
+
+
+
+ &reftitle.description;
+
+ finalpublicstringMongoDB\BSON\DBPointer::__toString
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns an empty string.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+
+ &reftitle.seealso;
+
+ BSON Types
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/dbpointer/unserialize.xml b/reference/mongodb/bson/dbpointer/unserialize.xml
new file mode 100644
index 0000000000..7ca0a52620
--- /dev/null
+++ b/reference/mongodb/bson/dbpointer/unserialize.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+ MongoDB\BSON\DBPointer::unserialize
+ Unserialize a DBPointer
+
+
+
+ &reftitle.description;
+
+ finalpublicvoidMongoDB\BSON\DBPointer::unserialize
+ stringserialized
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ serialized
+
+
+ The serialized MongoDB\BSON\DBPointer.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the unserialized MongoDB\BSON\DBPointer.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ MongoDB\BSON\DBPointer::serialize
+ unserialize
+ Serializing Objects
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/symbol.xml b/reference/mongodb/bson/symbol.xml
new file mode 100644
index 0000000000..9529380063
--- /dev/null
+++ b/reference/mongodb/bson/symbol.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ The MongoDB\BSON\Symbol class (deprecated)
+ MongoDB\BSON\Symbol
+
+
+
+
+
+ &reftitle.intro;
+
+ BSON type for the "Symbol" type. This BSON type is deprecated, and this
+ class can not be instantiated. It will be created from a BSON symbol
+ type while converting BSON to PHP, and can also be converted back into
+ BSON while storing documents in the database.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoDB\BSON\Symbol
+
+
+
+
+ MongoDB\BSON\Symbol
+
+
+
+ MongoDB\BSON\Type
+
+
+
+ Serializable
+
+
+
+ JsonSerializable
+
+
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+ &reference.mongodb.bson.entities.symbol;
+
+
+
+
diff --git a/reference/mongodb/bson/symbol/construct.xml b/reference/mongodb/bson/symbol/construct.xml
new file mode 100644
index 0000000000..1b9b2ad731
--- /dev/null
+++ b/reference/mongodb/bson/symbol/construct.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+ MongoDB\BSON\Symbol::__construct
+ Construct a new Symbol (unused)
+
+
+
+ &reftitle.description;
+
+ finalprivateMongoDB\BSON\Symbol::__construct
+
+
+
+ MongoDB\BSON\Symbol objects are created through
+ conversion from a deprecated BSON type and cannot be constructed directly.
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+
+ &reftitle.seealso;
+
+ BSON Types
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/symbol/jsonserialize.xml b/reference/mongodb/bson/symbol/jsonserialize.xml
new file mode 100644
index 0000000000..fd5db95e99
--- /dev/null
+++ b/reference/mongodb/bson/symbol/jsonserialize.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ MongoDB\BSON\Symbol::jsonSerialize
+ Returns a representation that can be converted to JSON
+
+
+
+ &reftitle.description;
+
+ finalpublicmixedMongoDB\BSON\Symbol::jsonSerialize
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns data which can be serialized by json_encode to
+ produce the extended
+ JSON representation of the MongoDB\BSON\Symbol.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ JsonSerializable::jsonSerialize
+ json_encode
+ MongoDB Extended JSON
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/symbol/serialize.xml b/reference/mongodb/bson/symbol/serialize.xml
new file mode 100644
index 0000000000..f807d03223
--- /dev/null
+++ b/reference/mongodb/bson/symbol/serialize.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ MongoDB\BSON\Symbol::serialize
+ Serialize a Symbol
+
+
+
+ &reftitle.description;
+
+ finalpublicstringMongoDB\BSON\Symbol::serialize
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the serialized representation of the
+ MongoDB\BSON\Symbol.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ MongoDB\BSON\Symbol::unserialize
+ serialize
+ Serializing Objects
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/symbol/tostring.xml b/reference/mongodb/bson/symbol/tostring.xml
new file mode 100644
index 0000000000..066974f189
--- /dev/null
+++ b/reference/mongodb/bson/symbol/tostring.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+ MongoDB\BSON\Symbol::__toString
+ Returns the Symbol as a string
+
+
+
+ &reftitle.description;
+
+ finalpublicstringMongoDB\BSON\Symbol::__toString
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the string representation of this Symbol.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+
+ &reftitle.seealso;
+
+ BSON Types
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/symbol/unserialize.xml b/reference/mongodb/bson/symbol/unserialize.xml
new file mode 100644
index 0000000000..0fc0d1632c
--- /dev/null
+++ b/reference/mongodb/bson/symbol/unserialize.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+ MongoDB\BSON\Symbol::unserialize
+ Unserialize a Symbol
+
+
+
+ &reftitle.description;
+
+ finalpublicvoidMongoDB\BSON\Symbol::unserialize
+ stringserialized
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ serialized
+
+
+ The serialized MongoDB\BSON\Symbol.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the unserialized MongoDB\BSON\Symbol.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ MongoDB\BSON\Symbol::serialize
+ unserialize
+ Serializing Objects
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/undefined.xml b/reference/mongodb/bson/undefined.xml
new file mode 100644
index 0000000000..75a05fe358
--- /dev/null
+++ b/reference/mongodb/bson/undefined.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ The MongoDB\BSON\Undefined class (deprecated)
+ MongoDB\BSON\Undefined
+
+
+
+
+
+ &reftitle.intro;
+
+ BSON type for the "Undefined" type. This BSON type is deprecated, and this
+ class can not be instantiated. It will be created from a BSON undefined
+ type while converting BSON to PHP, and can also be converted back into
+ BSON while storing documents in the database.
+
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ MongoDB\BSON\Undefined
+
+
+
+
+ MongoDB\BSON\Undefined
+
+
+
+ MongoDB\BSON\Type
+
+
+
+ Serializable
+
+
+
+ JsonSerializable
+
+
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+ &reference.mongodb.bson.entities.undefined;
+
+
+
+
diff --git a/reference/mongodb/bson/undefined/construct.xml b/reference/mongodb/bson/undefined/construct.xml
new file mode 100644
index 0000000000..1f6e3ac9a0
--- /dev/null
+++ b/reference/mongodb/bson/undefined/construct.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+ MongoDB\BSON\Undefined::__construct
+ Construct a new Undefined (unused)
+
+
+
+ &reftitle.description;
+
+ finalprivateMongoDB\BSON\Undefined::__construct
+
+
+
+ MongoDB\BSON\Undefined objects are created through
+ conversion from a deprecated BSON type and cannot be constructed directly.
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+
+ &reftitle.seealso;
+
+ BSON Types
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/undefined/jsonserialize.xml b/reference/mongodb/bson/undefined/jsonserialize.xml
new file mode 100644
index 0000000000..c1ef7fc812
--- /dev/null
+++ b/reference/mongodb/bson/undefined/jsonserialize.xml
@@ -0,0 +1,69 @@
+
+
+
+
+
+ MongoDB\BSON\Undefined::jsonSerialize
+ Returns a representation that can be converted to JSON
+
+
+
+ &reftitle.description;
+
+ finalpublicmixedMongoDB\BSON\Undefined::jsonSerialize
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns data which can be serialized by json_encode to
+ produce the extended
+ JSON representation of the MongoDB\BSON\Undefined.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ JsonSerializable::jsonSerialize
+ json_encode
+ MongoDB Extended JSON
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/undefined/serialize.xml b/reference/mongodb/bson/undefined/serialize.xml
new file mode 100644
index 0000000000..4148c667b8
--- /dev/null
+++ b/reference/mongodb/bson/undefined/serialize.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ MongoDB\BSON\Undefined::serialize
+ Serialize a Undefined
+
+
+
+ &reftitle.description;
+
+ finalpublicstringMongoDB\BSON\Undefined::serialize
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the serialized representation of the
+ MongoDB\BSON\Undefined.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ MongoDB\BSON\Undefined::unserialize
+ serialize
+ Serializing Objects
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/undefined/tostring.xml b/reference/mongodb/bson/undefined/tostring.xml
new file mode 100644
index 0000000000..84f09f1e2b
--- /dev/null
+++ b/reference/mongodb/bson/undefined/tostring.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+ MongoDB\BSON\Undefined::__toString
+ Returns an empty string
+
+
+
+ &reftitle.description;
+
+ finalpublicstringMongoDB\BSON\Undefined::__toString
+
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+ Returns an empty string.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+
+ &reftitle.seealso;
+
+ BSON Types
+
+
+
+
+
+
diff --git a/reference/mongodb/bson/undefined/unserialize.xml b/reference/mongodb/bson/undefined/unserialize.xml
new file mode 100644
index 0000000000..3aaf78f812
--- /dev/null
+++ b/reference/mongodb/bson/undefined/unserialize.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+ MongoDB\BSON\Undefined::unserialize
+ Unserialize a Undefined
+
+
+
+ &reftitle.description;
+
+ finalpublicvoidMongoDB\BSON\Undefined::unserialize
+ stringserialized
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ serialized
+
+
+ The serialized MongoDB\BSON\Undefined.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the unserialized MongoDB\BSON\Undefined.
+
+
+
+
+ &reftitle.errors;
+
+ &mongodb.throws.argumentparsing;
+
+
+
+
+ &reftitle.seealso;
+
+ MongoDB\BSON\Undefined::serialize
+ unserialize
+ Serializing Objects
+
+
+
+
+
+
diff --git a/reference/mongodb/functions/bson/tophp.xml b/reference/mongodb/functions/bson/tophp.xml
index 7398d6a309..231e7934c3 100644
--- a/reference/mongodb/functions/bson/tophp.xml
+++ b/reference/mongodb/functions/bson/tophp.xml
@@ -21,10 +21,14 @@
- Fields containing deprecated BSON types (i.e. undefined, symbol, DBPointer)
- are ignored when converting BSON to PHP. This can result in a loss of data
- when round-tripping BSON documents through PHP, as any fields containing a
- deprecated type will be silently dropped.
+ Fields containing deprecated BSON types (i.e. undefined, symbol,
+ DBPointer) are represented only by bare-bones objects of the classes
+ MongoDB\BSON\Undefined,
+ MongoDB\BSON\Symbol, and
+ MongoDB\BSON\DBPointer, when converting BSON to
+ PHP. These objects are created from BSON data and used for storing these
+ types back into the database, but can not be instantiated as they have a
+ private constructor.
@@ -60,13 +64,6 @@
a class in the type map cannot be instantiated or does not implement
MongoDB\BSON\Unserializable.
-
- Throws
- MongoDB\Driver\Exception\UnexpectedValueException if
- the input contains an unsupported, deprecated BSON type. Possible types
- include 0x06 (undefined), 0x0E
- (symbol), and 0x0C (DBPointer).
-
&mongodb.throws.bson.unexpected;
@@ -83,6 +80,16 @@
+
+ 1.4.0
+
+
+ If the input contains an unsupported, deprecated BSON type, the
+ driver will now no longer log a warning to the debug log, but instead
+ will create an object representing this type.
+
+
+ 1.3.2
diff --git a/reference/mongodb/mongodb/driver/cursor.xml b/reference/mongodb/mongodb/driver/cursor.xml
index 5ff8d4cc6a..6068fd63a9 100644
--- a/reference/mongodb/mongodb/driver/cursor.xml
+++ b/reference/mongodb/mongodb/driver/cursor.xml
@@ -49,6 +49,23 @@
+
+ &reftitle.errors;
+
+ When iterating over the cursor object, BSON data is converted into PHP
+ variables. This iteration can cause the following Exceptions:
+
+
+
+ Throws
+ MongoDB\Driver\Exception\InvalidArgumentException if
+ a class in the type map cannot be instantiated or does not implement
+ MongoDB\BSON\Unserializable.
+
+ &mongodb.throws.bson.unexpected;
+
+
+
&reference.mongodb.mongodb.driver.entities.cursor;
diff --git a/reference/mongodb/mongodb/driver/cursor/settypemap.xml b/reference/mongodb/mongodb/driver/cursor/settypemap.xml
index 443a0f7af4..9949f30a11 100644
--- a/reference/mongodb/mongodb/driver/cursor/settypemap.xml
+++ b/reference/mongodb/mongodb/driver/cursor/settypemap.xml
@@ -39,6 +39,19 @@
&mongodb.throws.argumentparsing;
+
+ When iterating over the cursor, the following exceptions can also be thrown
+ due to an incorrect type map configuration:
+
+
+ Throws
+ MongoDB\Driver\Exception\InvalidArgumentException if
+ a class in the type map cannot be instantiated or does not implement
+ MongoDB\BSON\Unserializable.
+
+
+
+
diff --git a/reference/mongodb/versions.xml b/reference/mongodb/versions.xml
index dfa2be2c16..85f72688e6 100644
--- a/reference/mongodb/versions.xml
+++ b/reference/mongodb/versions.xml
@@ -280,6 +280,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+