Commit Graph

242 Commits

Author SHA1 Message Date
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
Jeremy Mikola
f4cea432a9 PHPC-936: Define PHP_MONGODB_VERSION and STABILITY constants
This removes the redundant MONGODB_VERSION constant renames the existing version and stability constants to be consistent with the format in PHP's extension skeleton: dcfd753104
2017-03-17 14:47:21 -04:00
Jeremy Mikola
35954e195d Back to -dev 2017-03-15 13:55:28 -04:00
Jeremy Mikola
0c4450ff26 Package 1.2.7 2017-03-15 13:54:52 -04:00
Jeremy Mikola
ff7a211cc0 PHPC-932: Remove reference to Manager on Cursor, Server, and WriteResult
This reverts changes introduced in PHPC-671, which are no longer necessary due to mongoc_client_t persistence (PHPC-433).
2017-03-10 09:50:37 -05:00
Jeremy Mikola
bdcbc8cdba Back to -dev 2017-03-07 14:13:36 -05:00
Jeremy Mikola
f2d54bf68e Package 1.2.6 2017-03-07 14:13:05 -05:00
Jeremy Mikola
62f9487fcd Merge branch 'v1.2' 2017-03-06 12:18:35 -05:00
Jeremy Mikola
600db56bd8 PHPC-912: Do not destroy persisted clients created by other processes 2017-03-06 12:13:33 -05:00
Jeremy Mikola
99f0f39386 Remove unused _phongo_debug_bson() function 2017-02-10 15:56:12 -05:00
Jeremy Mikola
7debc8a43e PHPC-908: Do not declare MINIT functions for each driver class 2017-02-10 15:56:12 -05:00
Jeremy Mikola
064add8f8e PHPC-907: Remove PHONGO_API macro for exported symbols 2017-02-10 15:56:12 -05:00
Jeremy Mikola
ac71b93a15 php_flock() is no longer used 2017-02-10 15:56:12 -05:00
Jeremy Mikola
31b8693bba Back to -dev 2017-01-31 13:25:20 -05:00
Jeremy Mikola
c578d6f87b Package 1.2.5 2017-01-31 13:21:50 -05:00
Jeremy Mikola
bd6762ea28 Back to -dev 2017-01-30 17:28:20 -05:00
Jeremy Mikola
2b381e27bb Package 1.2.4 2017-01-30 17:27:34 -05:00
Jeremy Mikola
0e2d2c73e9 Master branch is now 1.3.0-dev 2017-01-20 12:21:41 -05:00
Jeremy Mikola
85562ba195 Back to -dev 2017-01-17 13:36:45 -05:00
Jeremy Mikola
7d0e33419c Package 1.2.3 2017-01-17 13:23:30 -05:00
Jeremy Mikola
2efc183b38 PHPC-890: Add license header copypasta 2017-01-06 15:41:58 -05:00