Skip to content

Commit 598e8e2

Browse files
committed
Merge pull request #640
2 parents 138ba06 + 94ee50e commit 598e8e2

File tree

62 files changed

+222
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+222
-222
lines changed

config.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ if test "$MONGODB" != "no"; then
164164
src/BSON/MaxKeyInterface.c \
165165
src/BSON/MinKey.c \
166166
src/BSON/MinKeyInterface.c \
167-
src/BSON/ObjectID.c \
168-
src/BSON/ObjectIDInterface.c \
167+
src/BSON/ObjectId.c \
168+
src/BSON/ObjectIdInterface.c \
169169
src/BSON/Persistable.c \
170170
src/BSON/Regex.c \
171171
src/BSON/RegexInterface.c \
@@ -180,7 +180,7 @@ if test "$MONGODB" != "no"; then
180180
src/MongoDB/BulkWrite.c \
181181
src/MongoDB/Command.c \
182182
src/MongoDB/Cursor.c \
183-
src/MongoDB/CursorID.c \
183+
src/MongoDB/CursorId.c \
184184
src/MongoDB/Manager.c \
185185
src/MongoDB/Query.c \
186186
src/MongoDB/ReadConcern.c \

config.w32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ if (PHP_MONGODB != "no") {
8484

8585
EXTENSION("mongodb", "php_phongo.c phongo_compat.c", null, PHP_MONGODB_CFLAGS);
8686
ADD_SOURCES(configure_module_dirname + "/src", "bson.c bson-encode.c", "mongodb");
87-
ADD_SOURCES(configure_module_dirname + "/src/BSON", "Binary.c BinaryInterface.c Decimal128.c Decimal128Interface.c Javascript.c JavascriptInterface.c MaxKey.c MaxKeyInterface.c MinKey.c MinKeyInterface.c ObjectID.c ObjectIDInterface.c Persistable.c Regex.c RegexInterface.c Serializable.c Timestamp.c TimestampInterface.c Type.c Unserializable.c UTCDateTime.c UTCDateTimeInterface.c functions.c", "mongodb");
88-
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "BulkWrite.c Command.c Cursor.c CursorID.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c", "mongodb");
87+
ADD_SOURCES(configure_module_dirname + "/src/BSON", "Binary.c BinaryInterface.c Decimal128.c Decimal128Interface.c Javascript.c JavascriptInterface.c MaxKey.c MaxKeyInterface.c MinKey.c MinKeyInterface.c ObjectId.c ObjectIdInterface.c Persistable.c Regex.c RegexInterface.c Serializable.c Timestamp.c TimestampInterface.c Type.c Unserializable.c UTCDateTime.c UTCDateTimeInterface.c functions.c", "mongodb");
88+
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "BulkWrite.c Command.c Cursor.c CursorId.c Manager.c Query.c ReadConcern.c ReadPreference.c Server.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c", "mongodb");
8989
ADD_SOURCES(configure_module_dirname + "/src/MongoDB/Exception", "AuthenticationException.c BulkWriteException.c ConnectionException.c ConnectionTimeoutException.c Exception.c ExecutionTimeoutException.c InvalidArgumentException.c LogicException.c RuntimeException.c SSLConnectionException.c UnexpectedValueException.c WriteException.c", "mongodb");
9090
ADD_SOURCES(configure_module_dirname + "/src/MongoDB/Monitoring", "CommandFailedEvent.c CommandStartedEvent.c CommandSubscriber.c CommandSucceededEvent.c Subscriber.c functions.c", "mongodb");
9191
ADD_SOURCES(configure_module_dirname + "/src/libbson/src/bson", PHP_MONGODB_BSON_SOURCES, "mongodb");

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ static const char *php_phongo_bson_type_to_string(bson_type_t type) /* {{{ */
937937
case BSON_TYPE_ARRAY: return "array";
938938
case BSON_TYPE_BINARY: return "Binary";
939939
case BSON_TYPE_UNDEFINED: return "undefined";
940-
case BSON_TYPE_OID: return "ObjectID";
940+
case BSON_TYPE_OID: return "ObjectId";
941941
case BSON_TYPE_BOOL: return "boolean";
942942
case BSON_TYPE_DATE_TIME: return "UTCDateTime";
943943
case BSON_TYPE_NULL: return "null";

serialization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ map from each supported data type to a class of your own, providing it
233233
implements the ``MongoDB\BSON\TypeWrapper`` interface.
234234

235235
The supported data types are Binary, Decimal128, Javascript, MaxKey, MinKey,
236-
ObjectID, Regex, Timestamp, and UTCDateTime.
236+
ObjectId, Regex, Timestamp, and UTCDateTime.
237237

238238
The ``MongoDB\BSON\TypeWrapper`` interface defines two functions:
239239
``createFromBSONType()``, a factory method which takes a ``MongoDB\BSON\Type``

src/BSON/ObjectID.c renamed to src/BSON/ObjectId.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static bool php_phongo_objectid_init_from_hex_string(php_phongo_objectid_t *inte
6060
return true;
6161
}
6262

63-
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error parsing ObjectID string: %s", hex);
63+
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error parsing ObjectId string: %s", hex);
6464

6565
return false;
6666
} /* }}} */
@@ -89,9 +89,9 @@ static bool php_phongo_objectid_init_from_hash(php_phongo_objectid_t *intern, Ha
8989
return false;
9090
} /* }}} */
9191

92-
/* {{{ proto void MongoDB\BSON\ObjectID::__construct([string $id])
93-
Constructs a new BSON ObjectID type, optionally from a hex string. */
94-
static PHP_METHOD(ObjectID, __construct)
92+
/* {{{ proto void MongoDB\BSON\ObjectId::__construct([string $id])
93+
Constructs a new BSON ObjectId type, optionally from a hex string. */
94+
static PHP_METHOD(ObjectId, __construct)
9595
{
9696
php_phongo_objectid_t *intern;
9797
zend_error_handling error_handling;
@@ -115,9 +115,9 @@ static PHP_METHOD(ObjectID, __construct)
115115
}
116116
} /* }}} */
117117

118-
/* {{{ proto integer MongoDB\BSON\ObjectID::getTimestamp()
118+
/* {{{ proto integer MongoDB\BSON\ObjectId::getTimestamp()
119119
*/
120-
static PHP_METHOD(ObjectID, getTimestamp)
120+
static PHP_METHOD(ObjectId, getTimestamp)
121121
{
122122
php_phongo_objectid_t *intern;
123123
bson_oid_t tmp_oid;
@@ -132,9 +132,9 @@ static PHP_METHOD(ObjectID, getTimestamp)
132132
RETVAL_LONG(bson_oid_get_time_t(&tmp_oid));
133133
} /* }}} */
134134

135-
/* {{{ proto MongoDB\BSON\ObjectID::__set_state(array $properties)
135+
/* {{{ proto MongoDB\BSON\ObjectId::__set_state(array $properties)
136136
*/
137-
static PHP_METHOD(ObjectID, __set_state)
137+
static PHP_METHOD(ObjectId, __set_state)
138138
{
139139
php_phongo_objectid_t *intern;
140140
HashTable *props;
@@ -152,9 +152,9 @@ static PHP_METHOD(ObjectID, __set_state)
152152
php_phongo_objectid_init_from_hash(intern, props TSRMLS_CC);
153153
} /* }}} */
154154

155-
/* {{{ proto string MongoDB\BSON\ObjectID::__toString()
155+
/* {{{ proto string MongoDB\BSON\ObjectId::__toString()
156156
*/
157-
static PHP_METHOD(ObjectID, __toString)
157+
static PHP_METHOD(ObjectId, __toString)
158158
{
159159
php_phongo_objectid_t *intern;
160160

@@ -169,9 +169,9 @@ static PHP_METHOD(ObjectID, __toString)
169169
PHONGO_RETURN_STRINGL(intern->oid, 24);
170170
} /* }}} */
171171

172-
/* {{{ proto array MongoDB\BSON\ObjectID::jsonSerialize()
172+
/* {{{ proto array MongoDB\BSON\ObjectId::jsonSerialize()
173173
*/
174-
static PHP_METHOD(ObjectID, jsonSerialize)
174+
static PHP_METHOD(ObjectId, jsonSerialize)
175175
{
176176
php_phongo_objectid_t *intern;
177177

@@ -185,9 +185,9 @@ static PHP_METHOD(ObjectID, jsonSerialize)
185185
ADD_ASSOC_STRINGL(return_value, "$oid", intern->oid, 24);
186186
} /* }}} */
187187

188-
/* {{{ proto string MongoDB\BSON\ObjectID::serialize()
188+
/* {{{ proto string MongoDB\BSON\ObjectId::serialize()
189189
*/
190-
static PHP_METHOD(ObjectID, serialize)
190+
static PHP_METHOD(ObjectId, serialize)
191191
{
192192
php_phongo_objectid_t *intern;
193193
#if PHP_VERSION_ID >= 70000
@@ -224,9 +224,9 @@ static PHP_METHOD(ObjectID, serialize)
224224
zval_ptr_dtor(&retval);
225225
} /* }}} */
226226

227-
/* {{{ proto void MongoDB\BSON\ObjectID::unserialize(string $serialized)
227+
/* {{{ proto void MongoDB\BSON\ObjectId::unserialize(string $serialized)
228228
*/
229-
static PHP_METHOD(ObjectID, unserialize)
229+
static PHP_METHOD(ObjectId, unserialize)
230230
{
231231
php_phongo_objectid_t *intern;
232232
zend_error_handling error_handling;
@@ -270,35 +270,35 @@ static PHP_METHOD(ObjectID, unserialize)
270270
zval_ptr_dtor(&props);
271271
} /* }}} */
272272

273-
/* {{{ MongoDB\BSON\ObjectID function entries */
274-
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID___construct, 0, 0, 0)
273+
/* {{{ MongoDB\BSON\ObjectId function entries */
274+
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectId___construct, 0, 0, 0)
275275
ZEND_ARG_INFO(0, id)
276276
ZEND_END_ARG_INFO()
277277

278-
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID___set_state, 0, 0, 1)
278+
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectId___set_state, 0, 0, 1)
279279
ZEND_ARG_ARRAY_INFO(0, properties, 0)
280280
ZEND_END_ARG_INFO()
281281

282-
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID_unserialize, 0, 0, 1)
282+
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectId_unserialize, 0, 0, 1)
283283
ZEND_ARG_INFO(0, serialized)
284284
ZEND_END_ARG_INFO()
285285

286-
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectID_void, 0, 0, 0)
286+
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectId_void, 0, 0, 0)
287287
ZEND_END_ARG_INFO()
288288

289289
static zend_function_entry php_phongo_objectid_me[] = {
290-
PHP_ME(ObjectID, __construct, ai_ObjectID___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
291-
PHP_ME(ObjectID, getTimestamp, ai_ObjectID_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
292-
PHP_ME(ObjectID, __set_state, ai_ObjectID___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
293-
PHP_ME(ObjectID, __toString, ai_ObjectID_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
294-
PHP_ME(ObjectID, jsonSerialize, ai_ObjectID_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
295-
PHP_ME(ObjectID, serialize, ai_ObjectID_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
296-
PHP_ME(ObjectID, unserialize, ai_ObjectID_unserialize, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
290+
PHP_ME(ObjectId, __construct, ai_ObjectId___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
291+
PHP_ME(ObjectId, getTimestamp, ai_ObjectId_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
292+
PHP_ME(ObjectId, __set_state, ai_ObjectId___set_state, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
293+
PHP_ME(ObjectId, __toString, ai_ObjectId_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
294+
PHP_ME(ObjectId, jsonSerialize, ai_ObjectId_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
295+
PHP_ME(ObjectId, serialize, ai_ObjectId_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
296+
PHP_ME(ObjectId, unserialize, ai_ObjectId_unserialize, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
297297
PHP_FE_END
298298
};
299299
/* }}} */
300300

301-
/* {{{ MongoDB\BSON\ObjectID object handlers */
301+
/* {{{ MongoDB\BSON\ObjectId object handlers */
302302
static zend_object_handlers php_phongo_handler_objectid;
303303

304304
static void php_phongo_objectid_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
@@ -409,7 +409,7 @@ void php_phongo_objectid_init_ce(INIT_FUNC_ARGS) /* {{{ */
409409
{
410410
zend_class_entry ce;
411411

412-
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "ObjectID", php_phongo_objectid_me);
412+
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "ObjectId", php_phongo_objectid_me);
413413
php_phongo_objectid_ce = zend_register_internal_class(&ce TSRMLS_CC);
414414
php_phongo_objectid_ce->create_object = php_phongo_objectid_create_object;
415415
PHONGO_CE_FINAL(php_phongo_objectid_ce);

src/BSON/ObjectIDInterface.c renamed to src/BSON/ObjectIdInterface.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525

2626
zend_class_entry *php_phongo_objectid_interface_ce;
2727

28-
/* {{{ MongoDB\BSON\ObjectIDInterface function entries */
29-
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectIDInterface_void, 0, 0, 0)
28+
/* {{{ MongoDB\BSON\ObjectIdInterface function entries */
29+
ZEND_BEGIN_ARG_INFO_EX(ai_ObjectIdInterface_void, 0, 0, 0)
3030
ZEND_END_ARG_INFO()
3131

3232
static zend_function_entry php_phongo_objectid_interface_me[] = {
33-
ZEND_ABSTRACT_ME(ObjectIDInterface, getTimestamp, ai_ObjectIDInterface_void)
34-
ZEND_ABSTRACT_ME(ObjectIDInterface, __toString, ai_ObjectIDInterface_void)
33+
ZEND_ABSTRACT_ME(ObjectIdInterface, getTimestamp, ai_ObjectIdInterface_void)
34+
ZEND_ABSTRACT_ME(ObjectIdInterface, __toString, ai_ObjectIdInterface_void)
3535
PHP_FE_END
3636
};
3737
/* }}} */
@@ -40,7 +40,7 @@ void php_phongo_objectid_interface_init_ce(INIT_FUNC_ARGS) /* {{{ */
4040
{
4141
zend_class_entry ce;
4242

43-
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "ObjectIDInterface", php_phongo_objectid_interface_me);
43+
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "ObjectIdInterface", php_phongo_objectid_interface_me);
4444
php_phongo_objectid_interface_ce = zend_register_internal_interface(&ce TSRMLS_CC);
4545
} /* }}} */
4646

src/MongoDB/BulkWrite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ static PHP_METHOD(BulkWrite, insert)
246246
/* If the insert document appears to be a legacy index, instruct libmongoc
247247
* to allow dots in BSON keys by setting the "legacyIndex" option.
248248
*
249-
* Note: php_phongo_zval_to_bson() may have added an ObjectID if the "_id"
249+
* Note: php_phongo_zval_to_bson() may have added an ObjectId if the "_id"
250250
* field was unset. We don't know at this point if the insert is destined
251251
* for a pre-2.6 server's "system.indexes" collection, but legacy index
252252
* creation will ignore the "_id" so there is no harm in leaving it. In the
253253
* event php_phongo_bulkwrite_insert_is_legacy_index() returns a false
254-
* positive, we absolutely want ObjectID added if "_id" was unset. */
254+
* positive, we absolutely want ObjectId added if "_id" was unset. */
255255
if (php_phongo_bulkwrite_insert_is_legacy_index(&bdocument) &&
256256
!BSON_APPEND_BOOL(&boptions, "legacyIndex", true)) {
257257
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error appending \"legacyIndex\" option");

src/MongoDB/Cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static PHP_METHOD(Cursor, toArray)
270270
}
271271
} /* }}} */
272272

273-
/* {{{ proto MongoDB\Driver\CursorID MongoDB\Driver\Cursor::getId()
273+
/* {{{ proto MongoDB\Driver\CursorId MongoDB\Driver\Cursor::getId()
274274
Returns the CursorId for this cursor */
275275
static PHP_METHOD(Cursor, getId)
276276
{

src/MongoDB/CursorID.c renamed to src/MongoDB/CursorId.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
zend_class_entry *php_phongo_cursorid_ce;
2828

29-
/* {{{ proto string MongoDB\Driver\CursorID::__toString()
30-
Returns the string representation of the CursorID */
31-
static PHP_METHOD(CursorID, __toString)
29+
/* {{{ proto string MongoDB\Driver\CursorId::__toString()
30+
Returns the string representation of the CursorId */
31+
static PHP_METHOD(CursorId, __toString)
3232
{
3333
php_phongo_cursorid_t *intern;
3434
char *tmp;
@@ -46,19 +46,19 @@ static PHP_METHOD(CursorID, __toString)
4646
efree(tmp);
4747
} /* }}} */
4848

49-
/* {{{ MongoDB\Driver\CursorID function entries */
50-
ZEND_BEGIN_ARG_INFO_EX(ai_CursorID_void, 0, 0, 0)
49+
/* {{{ MongoDB\Driver\CursorId function entries */
50+
ZEND_BEGIN_ARG_INFO_EX(ai_CursorId_void, 0, 0, 0)
5151
ZEND_END_ARG_INFO()
5252

5353
static zend_function_entry php_phongo_cursorid_me[] = {
54-
PHP_ME(CursorID, __toString, ai_CursorID_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
55-
ZEND_NAMED_ME(__construct, PHP_FN(MongoDB_disabled___construct), ai_CursorID_void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
56-
ZEND_NAMED_ME(__wakeup, PHP_FN(MongoDB_disabled___wakeup), ai_CursorID_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
54+
PHP_ME(CursorId, __toString, ai_CursorId_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
55+
ZEND_NAMED_ME(__construct, PHP_FN(MongoDB_disabled___construct), ai_CursorId_void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
56+
ZEND_NAMED_ME(__wakeup, PHP_FN(MongoDB_disabled___wakeup), ai_CursorId_void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
5757
PHP_FE_END
5858
};
5959
/* }}} */
6060

61-
/* {{{ MongoDB\Driver\CursorID object handlers */
61+
/* {{{ MongoDB\Driver\CursorId object handlers */
6262
static zend_object_handlers php_phongo_handler_cursorid;
6363

6464
static void php_phongo_cursorid_free_object(phongo_free_object_arg *object TSRMLS_DC) /* {{{ */
@@ -131,7 +131,7 @@ void php_phongo_cursorid_init_ce(INIT_FUNC_ARGS) /* {{{ */
131131
{
132132
zend_class_entry ce;
133133

134-
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\Driver", "CursorID", php_phongo_cursorid_me);
134+
INIT_NS_CLASS_ENTRY(ce, "MongoDB\\Driver", "CursorId", php_phongo_cursorid_me);
135135
php_phongo_cursorid_ce = zend_register_internal_class(&ce TSRMLS_CC);
136136
php_phongo_cursorid_ce->create_object = php_phongo_cursorid_create_object;
137137
PHONGO_CE_FINAL(php_phongo_cursorid_ce);

src/bson-encode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void php_phongo_bson_append_object(bson_t *bson, php_phongo_bson_flags_t
207207
bson_oid_t oid;
208208
php_phongo_objectid_t *intern = Z_OBJECTID_OBJ_P(object);
209209

210-
mongoc_log(MONGOC_LOG_LEVEL_TRACE, MONGOC_LOG_DOMAIN, "encoding ObjectID");
210+
mongoc_log(MONGOC_LOG_LEVEL_TRACE, MONGOC_LOG_DOMAIN, "encoding ObjectId");
211211
bson_oid_init_from_string(&oid, intern->oid);
212212
bson_append_oid(bson, key, key_len, &oid);
213213
return;

tests/apm/overview.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ object(MongoDB\Driver\Monitoring\CommandStartedEvent)#%d (%d) {
113113
["decimal"]=>
114114
int(12345678)
115115
["_id"]=>
116-
object(MongoDB\BSON\ObjectID)#%d (%d) {
116+
object(MongoDB\BSON\ObjectId)#%d (%d) {
117117
["oid"]=>
118118
string(24) "%s"
119119
}
@@ -198,7 +198,7 @@ array(%d) {
198198
[0]=>
199199
object(stdClass)#%d (%d) {
200200
["_id"]=>
201-
object(MongoDB\BSON\ObjectID)#%d (%d) {
201+
object(MongoDB\BSON\ObjectId)#%d (%d) {
202202
["oid"]=>
203203
string(24) "%s"
204204
}

tests/bson-corpus/oid-decodeError-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
ObjectID: OID truncated
2+
ObjectId: OID truncated
33
--DESCRIPTION--
44
Generated by scripts/convert-bson-corpus-tests.php
55

tests/bson-corpus/oid-valid-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
ObjectID: All zeroes
2+
ObjectId: All zeroes
33
--DESCRIPTION--
44
Generated by scripts/convert-bson-corpus-tests.php
55

tests/bson-corpus/oid-valid-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
ObjectID: All ones
2+
ObjectId: All ones
33
--DESCRIPTION--
44
Generated by scripts/convert-bson-corpus-tests.php
55

tests/bson-corpus/oid-valid-003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
ObjectID: Random
2+
ObjectId: Random
33
--DESCRIPTION--
44
Generated by scripts/convert-bson-corpus-tests.php
55

tests/bson/bson-fromPHP_error-003.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $tests = array(
1515
new MongoDB\BSON\Javascript('function foo(bar) {var baz = bar; var bar = foo; return bar; }'),
1616
new MongoDB\BSON\MinKey,
1717
new MongoDB\BSON\MaxKey,
18-
new MongoDB\BSON\ObjectID,
18+
new MongoDB\BSON\ObjectId,
1919
new MongoDB\BSON\Regex('regexp', 'i'),
2020
new MongoDB\BSON\Timestamp(1234, 5678),
2121
new MongoDB\BSON\UTCDateTime('1416445411987'),
@@ -41,7 +41,7 @@ MongoDB\BSON\Type instance MongoDB\BSON\MinKey cannot be serialized as a root el
4141
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
4242
MongoDB\BSON\Type instance MongoDB\BSON\MaxKey cannot be serialized as a root element
4343
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
44-
MongoDB\BSON\Type instance MongoDB\BSON\ObjectID cannot be serialized as a root element
44+
MongoDB\BSON\Type instance MongoDB\BSON\ObjectId cannot be serialized as a root element
4545
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
4646
MongoDB\BSON\Type instance MongoDB\BSON\Regex cannot be serialized as a root element
4747
OK: Got MongoDB\Driver\Exception\UnexpectedValueException

tests/bson/bson-generate-document-id.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ array(3) {
4646
string(8) "New York"
4747
}
4848
["_id"]=>
49-
object(%s\ObjectID)#%d (%d) {
49+
object(%s\ObjectId)#%d (%d) {
5050
["oid"]=>
5151
string(24) "%s"
5252
}
@@ -55,7 +55,7 @@ array(3) {
5555
Dumping fetched user document:
5656
object(stdClass)#%d (3) {
5757
["_id"]=>
58-
object(%s\ObjectID)#%d (%d) {
58+
object(%s\ObjectId)#%d (%d) {
5959
["oid"]=>
6060
string(24) "%s"
6161
}

0 commit comments

Comments
 (0)