262 Commits

Author SHA1 Message Date
Jeremy Mikola 9f118a2229 PHPC-1211: Int64 class to wrap 64-bit integers on 32-bit platforms 2018-06-22 13:07:33 -04:00
Derick Rethans b172a20c31 PHPC-1140: Implement Transactions specification 2018-06-19 14:47:29 +01:00
Derick Rethans f12e2005b4 PHPC-850: var_export() support for ReadPreference 2018-06-07 17:08:22 +01:00
Jeremy Mikola 480bc58cd3 Merge branch 'v1.4' 2018-04-18 16:08:00 -04:00
Jeremy Mikola aec79b2f12 Refactor command and query execute functions
This corrects the function signatures to return a boolean indicating success instead of an integer (which was cast from a boolean).

Additionally, it restructures phongo_execute_command() to use a cleanup label, in anticipation of implicit session changes.
2018-04-18 13:37:58 -04:00
Jeremy Mikola 230d8d9ab2 Define constant for ExceededTimeLimit server error 2018-04-16 17:03:29 -04:00
Katherine Walker 3125be38ca PHPC-1148: Remove PHONGO_ERROR_WRITE_FAILED 2018-04-12 10:20:58 -04:00
Jeremy Mikola cf0982b997 Back to -dev 2018-03-06 15:51:24 -05:00
Jeremy Mikola 7e7b4dd30f Package 1.4.2 2018-03-06 15:51:00 -05:00
Derick Rethans a7576aaa68 PHPC-1114: Add template.rc file to embed the right MongoDB version in the Windows binary 2018-02-27 13:09:40 +00:00
Jeremy Mikola d52e09ad11 Back to -dev 2018-02-20 14:36:25 -05:00
Jeremy Mikola 138897e595 Package 1.4.1 2018-02-20 14:35:55 -05:00
Derick Rethans 0a5fd12e20 PHPC-1118: Implement use of clang-format 2018-02-20 17:06:55 +00:00
Jeremy Mikola 494e1d969a Back to -dev 2018-02-08 22:59:28 -05:00
Jeremy Mikola 3692650604 Package 1.4.0 2018-02-08 22:58:53 -05:00
Jeremy Mikola 2e4c5de437 Back to -dev 2018-02-06 14:05:26 -05:00
Jeremy Mikola 3686f538ef Package 1.4.0RC2 2018-02-06 14:04:37 -05:00
Derick Rethans 13589c58b1 Master is now 1.5.0-dev. All v1.4 work needs to go to the v1.4 branch 2018-01-29 11:24:08 +00:00
Derick Rethans 06aeecf16d Back to -dev 2018-01-23 17:11:08 +00:00
Derick Rethans 05267bcfc4 Package 1.4.0RC1 2018-01-23 17:09:44 +00:00
Jeremy Mikola 37b8eaffd3 PHPC-1092: Don't reset hash on successive get_properties calls
This removes a call to zend_hash_clean() on successive calls to a BSON object's get_properties handler, which can lead to an infinite loop when iterating the object's properties with foreach on PHP 7.x.

For historical reference, the original call to zend_hash_clean() was introduced in ad1f3f049f for #607 (PHPC-939).
2018-01-08 22:03:39 -05:00
Jeremy Mikola d8d44f0acf PHPC-1050: Command cursor should not invoke getMore at execution 2018-01-08 10:26:45 -05:00
Jeremy Mikola a6d40fc42a Remove redundant phongo_bulkwrite_init function 2018-01-08 10:24:32 -05:00
Jeremy Mikola 165f1b5c5e Back to -dev 2017-12-21 17:03:08 -05:00
Jeremy Mikola de6d88a9c8 Package 1.4.0beta1 2017-12-21 16:55:37 -05:00
Jeremy Mikola c94405a925 Use uint32_t for server_id args and struct fields
Since Manager methods no longer pass -1 to execute functions in php_phongo.c, server_id should always be unsigned.
2017-12-18 12:11:57 -05:00
Jeremy Mikola b29c423fda PHPC-1057: Refactor option parsing for execute methods
Execute options are now parsed via php_array functions, which makes the options case-sensitive.

A helper function is now used to convert legacy options for the original three execute methods into an array. This simplifies option parsing in php_phongo.c.

Additionally, Manager methods now perform their own server selection, which means that execute functions in php_phongo.c can rely on a server_id being provided.

Tests have been updated to expect a serverId option when relevant (e.g. query opts). Additionally, error tests for execute methods have been improved so that invalid values for all known options are tested.
2017-12-18 12:11:57 -05:00
Jeremy Mikola d1d9d4a2bd PHPC-980: MongoDB\Driver\Session and "session" option
This introduces a Session class, which wraps libmongoc's client session object. Additionally, we support a "session" option on Manager and Server execute methods to allow operations to be associated with an explicit session (mostly relevant for causal consistency).
2017-12-15 16:25:56 -05:00
Jeremy Mikola f8009060cd PHPC-1070: Macro for accessing zval class or type name 2017-12-15 11:23:44 -05:00
Derick Rethans d3953f62a2 PHPC-1027: Introduce classes for deprecated BSON types (DBPointer) 2017-12-14 10:49:18 +00:00
Derick Rethans a9f6e3bb09 PHPC-1027: Introduce classes for deprecated BSON types (Symbol) 2017-12-14 10:49:18 +00:00
Derick Rethans a83f7f4f0f PHPC-1048: Rename phongo_execute_write to phongo_execute_bulk_write 2017-12-12 10:16:38 +00:00
Derick Rethans eea07a062e Fixed review comments, use COMMAND_* types instead of *ALLOWED constants, and fixed wrong name in error message 2017-11-29 13:08:08 +00:00
Derick Rethans a939e39de7 PHPC-834: Add Read, ReadWrite, and Write command execute methods 2017-11-28 14:30:12 +00:00
Derick Rethans 87fbd007f0 PHPC-1042: Support options array for BulkWrite, Command, and Query execute methods 2017-11-27 16:21:58 +00:00
Jeremy Mikola 33df20d6ce Master branch is now 1.4.0-dev 2017-10-27 15:58:12 -04:00
Jeremy Mikola 8742e1bc6f Back to -dev 2017-10-16 13:24:22 -04:00
Jeremy Mikola 7e99a31f8c Package 1.3.1 2017-10-16 13:22:39 -04:00
Jeremy Mikola 4c032069f3 Back to -dev 2017-09-19 16:43:58 -04:00
Jeremy Mikola e003449e31 Package 1.3.0 2017-09-19 16:43:06 -04:00
Jeremy Mikola 6f8eeb4906 Back to -dev 2017-09-14 12:19:21 -04:00
Jeremy Mikola 924c518832 Package 1.3.0RC1 2017-09-14 11:41:11 -04:00
Jeremy Mikola 74b67728a5 Back to -dev 2017-09-14 11:02:18 -04:00
Jeremy Mikola 74108a0f82 Package 1.3.0beta2 2017-09-14 10:52:58 -04:00
Jeremy Mikola a0796cd058 Back to -dev 2017-08-10 14:57:21 -04:00
Jeremy Mikola 845850c8b8 Package 1.3.0beta1 2017-08-10 14:55:59 -04:00
Jeremy Mikola e089c2bd01 PHPC-950: Skip APM callbacks if subscriber HashTable is uninitialized 2017-07-25 15:32:31 -04:00
Jeremy Mikola ad1f3f049f PHPC-939: Don't modify std props in BSON get_properties handlers 2017-07-10 14:31:19 -04:00
Derick Rethans 77a68728e2 PHPC-349: Implement APM specification 2017-03-31 13:44:46 +01:00
Jeremy Mikola 9b18a2adc3 Merge branch 'v1.2' 2017-03-20 09:29:05 -04:00