Skip to content

Commit 44e59fe

Browse files
committed
PHPLIB-280: Rename ObjectID to ObjectId
1 parent dcb4cca commit 44e59fe

27 files changed

+57
-57
lines changed

docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: _id
33
type: mixed
44
description: |
55
Value to use as the file document identifier. Defaults to a new
6-
:php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` object.
6+
:php:`MongoDB\\BSON\\ObjectId <class.mongodb-bson-objectid>` object.
77
interface: phpmethod
88
operation: ~
99
optional: true

docs/includes/extracts-note.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ content: |
77
<manual/en/language.types.type-juggling.php>` rules. When matching a special
88
BSON type the query criteria should use the respective :php:`BSON class
99
<manual/en/book.bson.php>` in the driver (e.g. use
10-
:php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` to match an
10+
:php:`MongoDB\\BSON\\ObjectId <class.mongodb-bson-objectid>` to match an
1111
:manual:`ObjectId </reference/object-id/>`).
1212
...

docs/reference/bson.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Consider the following class definition:
124124

125125
public function __construct($name)
126126
{
127-
$this->id = new MongoDB\BSON\ObjectID;
127+
$this->id = new MongoDB\BSON\ObjectId;
128128
$this->name = (string) $name;
129129
$this->createdAt = new MongoDB\BSON\UTCDateTime;
130130
}
@@ -167,7 +167,7 @@ The output would then resemble:
167167

168168
object(Person)#18 (3) {
169169
["id":"Person":private]=>
170-
object(MongoDB\BSON\ObjectID)#15 (1) {
170+
object(MongoDB\BSON\ObjectId)#15 (1) {
171171
["oid"]=>
172172
string(24) "56fad2c36118fd2e9820cfc1"
173173
}

docs/reference/method/MongoDBBulkWriteResult-getInsertedIds.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ insert operations in the bulk write.
3434
The index of each ID in the map corresponds to each document's position in the
3535
bulk operation. If a document had an ID prior to inserting (i.e. the driver did
3636
not generate an ID), the index will contain its ``_id`` field value. Any
37-
driver-generated ID will be a :php:`MongoDB\\BSON\\ObjectID
37+
driver-generated ID will be a :php:`MongoDB\\BSON\\ObjectId
3838
<class.mongodb-bson-objectid>` instance.

docs/reference/method/MongoDBBulkWriteResult-getUpsertedIds.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ update and replace operations in the bulk write.
3131
The index of each ID in the map corresponds to each document's position in the
3232
bulk operation. If a document had an ID prior to upserting (i.e. the server did
3333
not generate an ID), the index will contain its ``_id`` field value. Any
34-
server-generated ID will be a :php:`MongoDB\\BSON\\ObjectID
34+
server-generated ID will be a :php:`MongoDB\\BSON\\ObjectId
3535
<class.mongodb-bson-objectid>` instance.
3636

3737
Errors/Exceptions

docs/reference/method/MongoDBCollection-find.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The output would then resemble::
8383
["storage":"ArrayObject":private]=>
8484
array(4) {
8585
["_id"]=>
86-
object(MongoDB\BSON\ObjectID)#8 (1) {
86+
object(MongoDB\BSON\ObjectId)#8 (1) {
8787
["oid"]=>
8888
string(24) "576023c6b02fa9281da3f983"
8989
}
@@ -99,7 +99,7 @@ The output would then resemble::
9999
["storage":"ArrayObject":private]=>
100100
array(4) {
101101
["_id"]=>
102-
object(MongoDB\BSON\ObjectID)#12 (1) {
102+
object(MongoDB\BSON\ObjectId)#12 (1) {
103103
["oid"]=>
104104
string(24) "576023c6b02fa9281da3f98d"
105105
}
@@ -115,7 +115,7 @@ The output would then resemble::
115115
["storage":"ArrayObject":private]=>
116116
array(4) {
117117
["_id"]=>
118-
object(MongoDB\BSON\ObjectID)#10 (1) {
118+
object(MongoDB\BSON\ObjectId)#10 (1) {
119119
["oid"]=>
120120
string(24) "576023c6b02fa9281da3f99b"
121121
}
@@ -131,7 +131,7 @@ The output would then resemble::
131131
["storage":"ArrayObject":private]=>
132132
array(4) {
133133
["_id"]=>
134-
object(MongoDB\BSON\ObjectID)#13 (1) {
134+
object(MongoDB\BSON\ObjectId)#13 (1) {
135135
["oid"]=>
136136
string(24) "576023c6b02fa9281da3f9a8"
137137
}
@@ -147,7 +147,7 @@ The output would then resemble::
147147
["storage":"ArrayObject":private]=>
148148
array(4) {
149149
["_id"]=>
150-
object(MongoDB\BSON\ObjectID)#8 (1) {
150+
object(MongoDB\BSON\ObjectId)#8 (1) {
151151
["oid"]=>
152152
string(24) "576023c6b02fa9281da3f9b4"
153153
}

docs/reference/method/MongoDBCollection-findOne.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Matching BSON Types in Query Criteria
5656

5757
In the following example, documents in the ``restaurants`` collection use an
5858
:manual:`ObjectId </reference/object-id/>` for their identifier (the default)
59-
and documents in the ``zips`` collection use a string. Since ObjectID is a
59+
and documents in the ``zips`` collection use a string. Since ObjectId is a
6060
special BSON type, the query criteria for selecting a restaurant must use the
61-
:php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` class.
61+
:php:`MongoDB\\BSON\\ObjectId <class.mongodb-bson-objectid>` class.
6262

6363
.. code-block:: php
6464

@@ -67,7 +67,7 @@ special BSON type, the query criteria for selecting a restaurant must use the
6767
$zip = $database->zips->findOne(['_id' => '10036']);
6868

6969
$restaurant = $database->restaurants->findOne([
70-
'_id' => new MongoDB\BSON\ObjectID('594d5ef280a846852a4b3f70'),
70+
'_id' => new MongoDB\BSON\ObjectId('594d5ef280a846852a4b3f70'),
7171
]);
7272

7373
Projecting Fields
@@ -104,7 +104,7 @@ The output would then resemble::
104104
["storage":"ArrayObject":private]=>
105105
array(4) {
106106
["_id"]=>
107-
object(MongoDB\BSON\ObjectID)#8 (1) {
107+
object(MongoDB\BSON\ObjectId)#8 (1) {
108108
["oid"]=>
109109
string(24) "576023c6b02fa9281da3f983"
110110
}

docs/reference/method/MongoDBCollection-findOneAndDelete.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The output would then resemble::
7979
["storage":"ArrayObject":private]=>
8080
array(4) {
8181
["_id"]=>
82-
object(MongoDB\BSON\ObjectID)#11 (1) {
82+
object(MongoDB\BSON\ObjectId)#11 (1) {
8383
["oid"]=>
8484
string(24) "594d5ef280a846852a4b3f70"
8585
}

docs/reference/method/MongoDBCollection-findOneAndReplace.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The output would then resemble::
121121
["storage":"ArrayObject":private]=>
122122
array(6) {
123123
["_id"]=>
124-
object(MongoDB\BSON\ObjectID)#11 (1) {
124+
object(MongoDB\BSON\ObjectId)#11 (1) {
125125
["oid"]=>
126126
string(24) "594d5ef380a846852a4b5837"
127127
}

docs/reference/method/MongoDBCollection-findOneAndUpdate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The output would then resemble::
8080
["storage":"ArrayObject":private]=>
8181
array(2) {
8282
["_id"]=>
83-
object(MongoDB\BSON\ObjectID)#12 (1) {
83+
object(MongoDB\BSON\ObjectId)#12 (1) {
8484
["oid"]=>
8585
string(24) "594d5ef280a846852a4b3dee"
8686
}

0 commit comments

Comments
 (0)