Commit Graph

3944 Commits

Author SHA1 Message Date
Jeremy Mikola
653bd99252 Merge pull request #590 2017-05-08 12:20:07 -04:00
Jeremy Mikola
9559781147 PHPC-382, PHPC-471: Always return "_id" from BulkWrite::insert() 2017-05-08 09:45:46 -04:00
Jeremy Mikola
e30a90668f PHPC-579: Regression test mixing update/replacement with BulkWrite::update()
CDRIVER-1341 implemented client-side detection of the invalid newObj argument.
2017-05-08 09:44:02 -04:00
Jeremy Mikola
30c7db5c9d Merge pull request #591 2017-05-08 09:41:12 -04:00
Jeremy Mikola
f4040f0fdf PHPC-640: Specify TypeWrapper class entries in PHONGO_BSON_STATE_INITIALIZER 2017-05-05 16:28:43 -04:00
Jeremy Mikola
b41f6f0e30 Revert "Simplify PHONGO_BSON_STATE_INITIALIZER macro"
This reverts commit a869c9746a.
2017-05-05 16:24:31 -04:00
Jeremy Mikola
f779deb23f Merge branch 'v1.2' 2017-05-04 12:33:37 -04:00
Jeremy Mikola
6c67a9a73f Back to -dev 2017-05-04 12:33:17 -04:00
Jeremy Mikola
c3777b5a9d Package 1.2.9 1.2.9 2017-05-04 12:30:54 -04:00
Jeremy Mikola
5a92123f08 Merge pull request #581 2017-04-26 12:15:40 -04:00
Jeremy Mikola
882b342ece Revise X509 tests to use authMechanism URI array option 2017-04-26 11:48:35 -04:00
Jeremy Mikola
773d36450e PHPC-772: Parse authMechanism options in URI options array 2017-04-26 11:48:35 -04:00
Jeremy Mikola
8f1da9d343 Extract php_phongo_apply_options_to_uri() from php_phongo_make_uri() 2017-04-26 11:48:35 -04:00
Jeremy Mikola
bc9c266a78 PHPC-953: Do not parse "database" key in URI options array
This option was never documented and is redundant in light of the "authSource" option.
2017-04-26 11:48:35 -04:00
Jeremy Mikola
a13e118214 PHPC-957: Use libmongoc constants for applicable URI options 2017-04-26 11:48:35 -04:00
Jeremy Mikola
002ae2b53f Merge pull request #561 2017-04-26 11:45:28 -04:00
Jeremy Mikola
deb4fcde4b PHPC-640: Handle TypeWrappers during BSON serialization 2017-04-26 11:25:31 -04:00
Jeremy Mikola
60ec72a2d8 PHPC-640: TypeWrappers for BSON unserialization 2017-04-26 11:23:26 -04:00
Jeremy Mikola
122d7a86fd PHPC-640: Parse TypeWrapper classes in type maps 2017-04-26 11:23:26 -04:00
Jeremy Mikola
81b8d505d8 PHPC-937: Cursor::setTypeMap() and toPHP() should abort for invalid type map
This changes php_phongo_bson_typemap_to_state() to return a success boolean and also extracts class fetching into a separate php_phongo_bson_state_fetch_class() function to assist with supporting type wrappers in PHPC-640.
2017-04-26 11:23:26 -04:00
Jeremy Mikola
277df7ebee PHPC-640: TypeWrapper interface 2017-04-26 11:23:26 -04:00
Jeremy Mikola
8721fada72 Remove shadowed declaration in php_phongo_bson_append_object() 2017-04-26 11:23:26 -04:00
Jeremy Mikola
8b773781db Compatibility macro for accessing BSON state's zval 2017-04-26 11:22:11 -04:00
Jeremy Mikola
32dd8fa7c3 Remove redundant Z_SET_REFCOUNT calls
The zval ref counts are already 1 at the time this is called.
2017-04-26 11:22:11 -04:00
Jeremy Mikola
a869c9746a Simplify PHONGO_BSON_STATE_INITIALIZER macro
This replaces the work-around for gcc's missing-braces warning in 321c577f98.
2017-04-26 11:22:11 -04:00
Jeremy Mikola
608ce77839 Merge pull request #577 2017-04-20 15:20:11 -05:00
Jeremy Mikola
fcf5cc3142 PHPC-587: CursorId should serialize to BSON as 64-bit integer 2017-04-20 15:13:09 -05:00
Jeremy Mikola
fc9f0e4d9c Merge pull request #579 2017-04-20 15:09:39 -05:00
Jeremy Mikola
63f509ade8 PHPC-951: CursorId is a signed 64-bit integer 2017-04-14 16:26:54 -04:00
Jeremy Mikola
a2da17fade Merge pull request #578 2017-04-07 15:04:33 -04:00
Jeremy Mikola
f6140f8859 PHPC-941: Update BSON corpus tests
Generated from mongodb/specifications@9108073112
2017-04-07 14:54:54 -04:00
Derick Rethans
611b9f2fc7 PHPC-941: Use toExtendedJSON() for BSON corpus tests 2017-04-07 14:54:54 -04:00
Derick Rethans
980f1fb01a PHPC-941: Add MongoDB\BSON\toExtendedJSON() to wrap bson_as_extended_json() 2017-04-07 14:54:54 -04:00
Jeremy Mikola
2b9bf755e0 Merge branch 'v1.2' 2017-04-07 12:15:47 -04:00
Jeremy Mikola
e2b54e886c Merge pull request #576 2017-04-07 11:51:37 -04:00
Jeremy Mikola
27a4bf3031 PHPC-949: Fix leak if bsonSerialize() returns keys with null bytes 2017-04-07 11:41:58 -04:00
Jeremy Mikola
6dc2f9d09c Merge pull request #575 2017-04-07 11:41:03 -04:00
Jeremy Mikola
52eae8ba6d Improve comments on zend_call_method() failures 2017-04-07 11:16:58 -04:00
Jeremy Mikola
ecbab6d5a8 Split exceptions in bson-fromPHP-006.phpt into separate error test 2017-04-07 11:16:58 -04:00
Jeremy Mikola
58f432f429 PHPC-948: BSON encoding should throw on circular references 2017-04-07 11:16:58 -04:00
Jeremy Mikola
c8f6bad103 Create PHP 5.x compatibility macro for ZVAL_UNDEF 2017-04-07 11:16:58 -04:00
Derick Rethans
1609b483ba Merged pull request #570 2017-04-04 16:56:01 +01:00
Derick Rethans
68bb32c6f7 PHPC-904: ReadPreference constructor should accept strings 2017-04-04 16:55:49 +01:00
Jeremy Mikola
1553bbdf3d Merge pull request #524 2017-03-31 15:44:48 -04:00
Jeremy Mikola
175e3b3d45 PHPC-944: Translate MONGOC_ERROR_COMMAND_INVALID_ARG to InvalidArgumentException 2017-03-31 12:13:01 -04:00
Jeremy Mikola
7ff55ba42c PHPC-712: Validate BSON documents for insert and update
Rely on libmongoc for validating insert/update documents. If an insert document appears to be a legacy index, set the "legacyIndex" option for mongoc_bulk_operation_insert_with_opts() to allow BSON keys to contain dots (all other BSON validation for normal inserts is preserved).

Additionally, we add tests for BSON encoding errors on delete, insert, and update arguments. The removed Manager::executeBulkWrite() test is obsolete, since insert documents are now validated during insert().
2017-03-31 12:13:01 -04:00
Jeremy Mikola
1e0b1e8e29 Use statically allocated bson_t structs in BulkWrite 2017-03-31 12:13:01 -04:00
Jeremy Mikola
328cbfe53d Fix method call in BulkWrite::delete() test case 2017-03-31 12:13:01 -04:00
Derick Rethans
075e6c76d5 Merged pull request #466 2017-03-31 13:44:52 +01:00
Jeremy Mikola
0883a5d884 Use uint32_t for server_id in APM structs 2017-03-31 13:44:46 +01:00