Commit Graph

3944 Commits

Author SHA1 Message Date
Jeremy Mikola
6f580e72b4 Merge pull request #421 2016-09-21 15:34:11 -04:00
Jeremy Mikola
5c1ca63957 Use EXPECTF pattern for stdClass ID 2016-09-21 15:33:53 -04:00
Jeremy Mikola
288a7746ca Merge pull request #420 2016-09-21 15:33:27 -04:00
Jeremy Mikola
8d70686031 PHPC-705: Regression tests for superfluous $query wrapping 2016-09-21 12:09:46 -04:00
Jeremy Mikola
0c62e64228 Merge pull request #410 2016-09-21 11:47:31 -04:00
Hannes Magnusson
46950fa0b3 PHPC-791: Update pkg-config to require libmongoc and libbson 1.5.0 2016-09-21 11:46:08 -04:00
Jeremy Mikola
9b67aa5225 Merge pull request #419 2016-09-21 11:07:32 -04:00
Jeremy Mikola
887f0670b8 PHPC-734: BulkWrite update and delete "collation" option 2016-09-21 10:57:29 -04:00
Jeremy Mikola
943a00ec43 PHPC-794: BulkWrite::update() should throw for invalid replace ops 2016-09-21 10:57:29 -04:00
Jeremy Mikola
1fc30d4bff PHPC-796: Use flexible opts API for BulkWrite update and delete 2016-09-21 10:57:29 -04:00
Jeremy Mikola
63f7d31b85 Merge pull request #417 2016-09-21 07:42:52 -04:00
Jeremy Mikola
4e0fddffb9 Remove unused functions and macros 2016-09-21 07:42:43 -04:00
Jeremy Mikola
15286a1c18 Merge pull request #418 2016-09-21 07:42:04 -04:00
Jeremy Mikola
193f0aa1f1 Wrap macro arguments in parentheses 2016-09-20 19:44:39 -04:00
Jeremy Mikola
c4708a0123 Fix typo in Query constructor exception 2016-09-20 19:44:07 -04:00
Jeremy Mikola
45de038c8c Merge pull request #411 2016-09-20 18:17:59 -04:00
Jeremy Mikola
d6d4b1eeb4 PHPC-734: Query "collation" option 2016-09-20 16:57:20 -04:00
Jeremy Mikola
f37f589bbc PHPC-783: Use mongoc_collection_find_with_opts() for Query exec
Query struct fields have been consolidated to a filter and opts BSON documents.

This also changes the Query debug output significantly.
2016-09-20 16:57:20 -04:00
Jeremy Mikola
9e684628c8 Fix arg info for $options in Query ctor, which may be null 2016-09-20 16:57:20 -04:00
Jeremy Mikola
368e823102 PHPC-791: Bump libbson and libmongoc to 1.5.0-rc0 2016-09-20 16:57:20 -04:00
Derick Rethans
83e31ecb3f Merged pull request #416 2016-09-20 16:25:18 +01:00
Derick Rethans
53dec68a77 Disable test for HHVM, as we don't have logging for this 2016-09-20 15:00:36 +01:00
Derick Rethans
4509d0f6f0 Skip this test on HHVM, as the timezone is 'UTC' there 2016-09-20 15:00:35 +01:00
Derick Rethans
c2fe3b2089 Fixed __set_state whitespace compatibility issue with PHPC/HHVM tests 2016-09-20 15:00:22 +01:00
Jeremy Mikola
4a51f72911 Merge pull request #400 2016-09-19 16:55:32 -04:00
Jeremy Mikola
6ec5348957 Test that read preference options of the wrong type are ignored 2016-09-19 16:54:48 -04:00
Jeremy Mikola
0160871af6 PHPC-752: Validate range of maxStalenessMS Manager option
This also adds various tests for parsing of read preference Manager options.
2016-09-19 16:54:48 -04:00
Jeremy Mikola
eeb7c04d04 Remove unnecessary SKIPIFs from Manager ctor tests 2016-09-19 16:54:48 -04:00
Jeremy Mikola
701e07f9e5 Rename Manager ctor read preference and write concern tests 2016-09-19 16:54:48 -04:00
Jeremy Mikola
77209dd65d PHPC-752: Add maxStalenessMS to ReadPreference class
This adds an options array to the ReadPreference constructor, which accepts a maxStalenessMS option. The option is also exposed via a getter method and in debug output.
2016-09-19 16:54:48 -04:00
Jeremy Mikola
40a0f52cc0 Use short array syntax in ReadPreference tests 2016-09-19 16:54:48 -04:00
Jeremy Mikola
d9b6613562 Remove unnecessary SKIPIFs from ReadPreference tests 2016-09-19 16:54:48 -04:00
Jeremy Mikola
236e9bdae6 Merge pull request #415 2016-09-19 16:54:13 -04:00
Jeremy Mikola
11d823f8cd PHPC-498: Fix expected output for ReadPreference and WriteConcern
These test fixes were missed in mongodb/mongo-php-driver#413.
2016-09-19 16:52:38 -04:00
Jeremy Mikola
fd79c3e8cc Merge pull request #414 2016-09-19 16:17:23 -04:00
Jeremy Mikola
8aa3187573 zend_fetch_class() expects a const char * for PHP 5.x 2016-09-19 16:15:28 -04:00
Jeremy Mikola
467b981f95 Move (char *) casting to ADD_ASSOC_STRING macro
This is necessary since PHP's add_assoc_string_ex() declares the argument as char *, even though it never modifies the string contents and later assigns it to a const char * internally. Since we always duplicate the string for PHP 5.x and it is never modified in PHP 7, there is no harm in this cast.
2016-09-19 16:13:05 -04:00
Derick Rethans
af450539ad Merged pull request #413 2016-09-19 20:33:46 +01:00
Derick Rethans
8f9e6c8c53 PHPC-498: ReadPreference, ReadConcern, and WriteConcern should serialize to BSON 2016-09-19 20:33:14 +01:00
Jeremy Mikola
e9d9f0dc41 Merge pull request #412 2016-09-19 12:07:45 -04:00
Derick Rethans
027384feed PHPC-786: Tests for appname URI option 2016-09-19 12:07:11 -04:00
Jeremy Mikola
8170399803 Merge pull request #409 2016-09-16 10:05:34 -04:00
Jeremy Mikola
b6296f7115 Use string literal php_array macros where possible 2016-09-15 14:02:10 -04:00
Jeremy Mikola
db32cab1f3 Merge pull request #408 2016-09-15 12:41:29 -04:00
Jeremy Mikola
5568225fcd Fix test name for ReadPreference::getTagSets() 2016-09-15 12:41:17 -04:00
Jeremy Mikola
6ea53f1b08 Merge pull request #399 2016-09-15 12:40:45 -04:00
Jeremy Mikola
56d8b77b15 PHPC-424: Validate that RP tag set is an array of documents
This adds common validation for read preference tag sets when specified through either the Manager constructor's URI options array or ReadPreference constructor.

An additional test case for a malformed tag set has been added to the Manager::__construct() error test for read preference options. Additionally, the ReadPreference::__construct() error test has been split up to test for mode and tagSet errors separately.

Note: we cannot test for the exceptions for bson_init_static() and mongoc_read_prefs_is_valid(), since those points will never be hit in normal operation.
2016-09-15 12:40:27 -04:00
Jeremy Mikola
0bfde7d162 Use correct type and format for ReadPreference ctor mode 2016-09-15 12:40:27 -04:00
Jeremy Mikola
53e7677f93 Back to -dev 2016-09-14 14:13:53 -04:00
Jeremy Mikola
d57a428450 Package 1.2.0alpha2 2016-09-14 14:13:00 -04:00