Commit Graph

3944 Commits

Author SHA1 Message Date
Jeremy Mikola
f4cf0fe3a0 PHPC-1113: Use common URI env var in basic/skipif includes 2018-05-02 16:04:07 -04:00
Derick Rethans
0273c79be4 Merged pull request #823 2018-04-30 14:25:26 +01:00
Derick Rethans
6e6380e836 PHPC-1118: Fixed formatting for deprecated opts macro 2018-04-30 14:23:40 +01:00
Katherine Walker
85e581908d Merge pull request #821 2018-04-27 14:06:54 -04:00
Katherine Walker
5e219a29b8 PHPC-1149: php_phongo_dispatch_handlers() should break if exception is thrown 2018-04-27 14:06:22 -04:00
Derick Rethans
f206b419da Merged pull request #819 2018-04-27 11:29:46 +01:00
Derick Rethans
8ee4372f0f PHPC-1118: Tidy up function_entry alignment oddness related to introduction of clang-format 2018-04-27 11:29:20 +01:00
Katherine Walker
15f19e1043 Merge pull request #820 2018-04-26 17:25:44 -04:00
Katherine Walker
7b4cb0c30e PHPC-1160: Initialize bson_error_t structs to zero 2018-04-26 15:31:14 -04:00
Derick Rethans
94c7487ead Merged pull request #816 2018-04-25 16:09:16 +01:00
Derick Rethans
54167755ca Fixed formatting. 2018-04-25 15:57:55 +01:00
Derick Rethans
a25a3d6b17 PHPC-1138: Deprecate snapshot option 2018-04-25 15:57:55 +01:00
Derick Rethans
f34ecdb9eb PHPC-1137: Deprecate maxScan option 2018-04-25 15:57:55 +01:00
Derick Rethans
c75f89bd71 Merged pull request #812 2018-04-25 12:07:16 +01:00
Derick Rethans
032f08fe4b PHPC-314: Added a few tests that don't touch the server 2018-04-25 11:55:10 +01:00
Jeremy Mikola
bd9c02107b Merge branch 'v1.4' 2018-04-24 13:55:28 -04:00
Jeremy Mikola
e23a50b2ef Merge pull request #817 2018-04-24 13:55:12 -04:00
Jeremy Mikola
eec9ad2a09 PHPC-1163: Ignore exception in causal consistency test 2018-04-24 13:52:42 -04:00
Jeremy Mikola
9fd2f10dfa Merge branch 'v1.4' 2018-04-24 13:47:29 -04:00
Jeremy Mikola
46711f57b7 Merge pull request #814 2018-04-24 13:20:19 -04:00
Jeremy Mikola
cceeda84c1 PHPC-1163: Prohibit session with unacknowledged write concern
This adds checks to ensure that explicit sessions and unacknowledged write concerns (explicit or inherited) will not be mixed when executing bulk writes or commands. Additionally, we ensure that command execution does not create its own implicit session (per PHPC-1152) if the effective write concern is unacknowledged.

Note: libmongoc still needs to ensure that it does not create implicit sessions for unacknowledged commands (CDRIVER-2615).
2018-04-24 13:18:53 -04:00
Jeremy Mikola
ebdf86f6d9 Merge branch 'v1.4' 2018-04-19 10:27:19 -04:00
Jeremy Mikola
2097bf3e07 Back to -dev 2018-04-19 10:26:53 -04:00
Jeremy Mikola
5403404de5 Package 1.4.3 1.4.3 2018-04-19 10:26:25 -04:00
Jeremy Mikola
58030116dd Apply code formatting to changes from v1.4 2018-04-18 16:17:45 -04:00
Jeremy Mikola
f5592cc344 Use EXPECTF for object dump output 2018-04-18 16:09:34 -04:00
Jeremy Mikola
480bc58cd3 Merge branch 'v1.4' 2018-04-18 16:08:00 -04:00
Jeremy Mikola
b27017da66 Merge pull request #803 2018-04-18 15:37:29 -04:00
Jeremy Mikola
1f222d0f78 PHPC-1151: Bump Cursor var_dump array size for Session
This should have done in cc90304658.
2018-04-18 14:37:51 -04:00
Jeremy Mikola
fdc7565507 PHPC-1161: Free reference to Session once Cursor is exhausted 2018-04-18 14:37:51 -04:00
Jeremy Mikola
427854e092 PHPC-1152: Create implicit session for commands
This ensures that phongo_execute_command creates an implicit session (if supported and not explicit session was provided). In turn, this ensures that any command cursor shares the same session as its originating command.

By creating a Session object, we can ensure that the implicit session is destroyed during garbage collection when the last reference is removed.
2018-04-18 14:36:39 -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
Katherine Walker
dadf1e6066 Merge pull request #813 2018-04-18 13:31:08 -04:00
Katherine Walker
3f9f7e07df PHPC-1159: Only run executeWriteCommand_error-003 on mongo version 3.4 or greater 2018-04-18 13:30:25 -04:00
Jeremy Mikola
0cb33f6c63 Merge branch 'v1.4' 2018-04-18 12:59:43 -04:00
Jeremy Mikola
57d3f6e042 Merge pull request #811 2018-04-18 12:59:26 -04:00
Jeremy Mikola
1dfc8df053 PHPC-1162: Add reference to currentDocument in debug info
This fixes a segfault while dumping the cursor between iterations with IteratorIterator.
2018-04-18 12:02:55 -04:00
Derick Rethans
eab4a215b4 Merged pull request #793 2018-04-18 11:47:07 +01:00
Derick Rethans
da8853a092 Move test case that doesn't touch server to BSON\toPHP() 2018-04-18 11:02:56 +01:00
Derick Rethans
b42165eecb Tweaks to test cases 2018-04-18 11:02:56 +01:00
Derick Rethans
2cd3e4f8c8 Abandon strtok_r() in favour of a hand rolled algorithm
strtok_r() can't handle empty elements :-/
2018-04-18 11:02:56 +01:00
Derick Rethans
bb31cd4db8 Hint to the compiler that map_element_matches_field_path() should be inlined 2018-04-18 11:02:56 +01:00
Derick Rethans
6da5d4b893 Rename free_elements to owns_elements, as that is more descriptive 2018-04-18 11:02:56 +01:00
Derick Rethans
dac1d78155 Use correct size in reallocs 2018-04-18 11:02:56 +01:00
Derick Rethans
f5965ce4d2 s/allocated/allocated_size 2018-04-18 11:02:56 +01:00
Derick Rethans
e7e9fe76e6 PHPC-1154: Fix memory leak with typemaps and MongoDB\BSON\toPHP 2018-04-18 11:02:56 +01:00
Derick Rethans
eddcd4bc5b PHPC-1154: Implement wild card syntax for typemap field paths 2018-04-18 11:02:56 +01:00
Derick Rethans
bdda892b2e PHPC-314: Parse fieldPaths element of the typemap into a tree 2018-04-18 11:02:56 +01:00
Derick Rethans
d4d1fa3968 PHPC-314: Record whether we're dealing with a document or an array for each level 2018-04-18 11:02:56 +01:00
Derick Rethans
f5e49768ea PHPC-314: Read fieldPaths elements and check for correct map types 2018-04-18 11:02:56 +01:00