Jeremy Mikola
27a4bf3031
PHPC-949: Fix leak if bsonSerialize() returns keys with null bytes
2017-04-07 11:41: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
f45916a38a
PHPC-940: php_phongo_free_ssl_opt() attempts to free interned strings
...
This issue only manifests itself on PHP 7, since interned strings are tracked in the zval struct instead of the character pointer as in PHP 5.x.
2017-03-28 00:15:59 -04:00
Jeremy Mikola
d5f41f659d
PHPC-411: Drop system.profile collection before tests
2017-03-15 10:44:45 -04:00
Jeremy Mikola
e6b8479506
Reorganize SKIPIF blocks in tests and add missing NEEDS() checks
2017-03-15 10:41:04 -04:00
Jeremy Mikola
3736c23bbb
Add missing REPLICASET_30 environment in basic.inc
2017-03-15 10:38:06 -04:00
Jeremy Mikola
9fd59053d8
PHPC-920: Regression test for mongoc_cursor_destroy() crash
2017-03-13 12:46:09 -04:00
Jeremy Mikola
116a827fb0
PHPC-732: Regression test for use-after-free with Cursor wrapped in generator
2017-03-09 15:42:32 -05:00
Jeremy Mikola
06778c6928
PHPC-901: False slaveOk URI option should be ignored
2017-03-06 12:14:44 -05:00
Jeremy Mikola
0c5d4f36f3
Regression tests for slaveOk URI option
2017-03-06 12:14:44 -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
0244d19cd3
PHPC-923: Use zend_string_release() to free class names
2017-03-03 09:41:58 -05:00
Jeremy Mikola
139ad8e12c
PHPC-924: Avoid unnecessary BSON conversion in Cursor::setTypeMap()
2017-03-03 09:23:02 -05:00
Jeremy Mikola
b55ea81fd6
PHPC-913: Child process should not re-use mongoc_client_t objects from parent
2017-02-13 17:21:39 -05:00
Jeremy Mikola
59dc7c7ebf
Remove obsolete tests for PHPC-487
...
These tests were originally written with the PHP stream handler in mind, which is no longer used in 1.2.0+.
2017-02-08 14:19:43 -05:00
Jeremy Mikola
44ac5c4889
Manager debug ouput tests should not depend on libmongoc tracing
...
These tests were fragile and could fail when using libmongoc as a system library where tracing may not be enabled.
2017-02-07 18:43:23 -05:00
Jeremy Mikola
6ed6a34f5b
Only assert mongodb.debug INI in phpinfo() tests
...
The current phpinfo() tests were fragile and not compatible when build against libbson/libmongoc system libraries, which might also have different SSL options.
2017-02-07 16:37:12 -05:00
Jeremy Mikola
04bd60be63
Make JavaScript::jsonSerialize() tests portable for libbson 1.5 and 1.6
2017-02-07 16:34:10 -05:00
Jeremy Mikola
8edd0c9034
Do not assert error message in fromJSON() error test
...
libbson 1.6.0 switched JSON parsers, which means this test fails when compiled against libbson 1.6.0 as a system library. Removing the error message assertion keeps the test portable.
2017-02-07 16:31:54 -05:00
Jeremy Mikola
e3c4439ae3
Remove Manager::executeBulkWrite() insert error test
...
In libmongoc 1.6.0, insert documents are validated during BulkWrite::insert(). This is a fragile test that fails when v1.2 is compiled against libmongoc 1.6.0 as a system library.
2017-02-07 16:30:04 -05:00
Jeremy Mikola
77be3df93d
Manager::executeQuery() without assignment test is obsolete
...
Testing query execution without return value assignment is already handled by tests/query/bug0705-001.phpt.
2017-02-07 16:28:41 -05:00
Jeremy Mikola
1cfffa5589
Use exactly representable floating point numbers in tests
...
CDRIVER-1945 increased the precision when rendering floating point numbers in JavaScript. Using numbers that can be exactly represented in floating point will allow us to keep the expected output consistent with our input.
2017-02-07 15:22:54 -05:00
Jeremy Mikola
0d0561a022
PHPC-898: Regression tests for readConcern option and getMore
2017-01-30 17:12:42 -05:00
Jeremy Mikola
8456780ac9
PHPC-894: Implement get_gc handlers for BSON classes
...
This addresses a memory leak if gc_possible_root() were to invoke the existing get_properties handlers.
2017-01-23 20:39:57 -05:00
Jeremy Mikola
937a2c2b37
PHPC-714: Expected failures for BSON corpus tests
2017-01-13 15:05:42 -05:00
Jeremy Mikola
44f54d9717
PHPC-714: Generate BSON corpus tests
...
Generated from mongodb/specifications@784379e0c1
2017-01-13 15:05:41 -05:00
Jeremy Mikola
56f3a9da74
PHPC-714: Script to convert BSON corpus tests
2017-01-13 15:05:41 -05:00
Jeremy Mikola
84dbfe07f7
PHPC-891: BSON encoding should throw if PHP keys contain null bytes
...
Since PHP uses leading null bytes in object properties to denote protected and private members, we ignore those keys in lieu of throwing an exception.
2017-01-10 12:00:49 -05:00
Jeremy Mikola
caa4650f73
PHPC-886: Always recalculate field name length when encoding BSON
2017-01-10 12:00:49 -05:00
Jeremy Mikola
b3b3a550e4
PHPC-884: Do not skip public property with empty string name during BSON encoding
...
This removes our is_public_property() helper function in favor of a simpler check on the mangled property name (as done by PHP's json_encode() function).
2017-01-10 12:00:49 -05:00
Jeremy Mikola
3a4da1c74c
PHPC-883: BSON array keys should be disregarded during visitation
2017-01-09 11:15:39 -05:00
Jeremy Mikola
1badc1bcbb
PHPC-633: Include libmongoc SSL, crypto, and SASL details in phpinfo()
2016-12-20 11:37:25 -05:00
Jeremy Mikola
b0192b29d6
Reorder libbson and libmongoc output in phpinfo()
2016-12-19 14:32:08 -05:00
Jeremy Mikola
2c4a1edd98
More descriptive labels for ext/dep versions in phpinfo()
2016-12-19 14:03:50 -05:00
Jeremy Mikola
2599607b47
PHPC-635: WriteResult debug handler should return objects
2016-12-19 09:40:29 -05:00
Jeremy Mikola
3beadc7c12
DateTime from current time now includes microseconds in PHP 7.1
2016-12-13 15:02:35 -05:00
Jeremy Mikola
081331ee2b
Update closed socket test for libmongoc stream handling
...
The previous error message was based on PHP's stream handlers, which are no longer used in 1.2.x.
2016-12-13 14:29:00 -05:00
Jeremy Mikola
120b270377
PHPC-851: Separate argument zvals before modification
...
This primarily fixes a bug introduced in 6d46d62577 for PHPC-359, since we convert tag sets from arrays to objects to ensure proper BSON serialization. Not only was the array mutation visible to calling contexts, but a crash could occur if the array was immutable due to OPcache.
For Manager's $driverOptions, a comment in 1060cb8ba4 for PHPC-433 indicated that we should have separated its zval due to possible modification, but the appropriate zend_parse_parameters() flag was never used.
2016-12-12 19:31:45 -05:00
Jeremy Mikola
0dd057d4d7
PHPC-849: Fix leaking of current element in setTypeMap()
2016-12-12 12:59:00 -05:00
Jeremy Mikola
99f4cbc673
Merge branch 'v1.1'
2016-12-07 12:26:07 -05:00
Jeremy Mikola
129753881a
PHPC-848: Consult ZEND_HASH_APPLY_PROTECTION() in PHP7
...
When a numeric array was encoded to BSON, the hash's apply counter was incremented and decremented irrespective of whether apply protection was enabled. This was not compatible with immutable arrays, which may be created by OPcache. We now consult ZEND_HASH_APPLY_PROTECTION() whenever an apply counter might be modified.
Previously, object_to_bson() incremented the apply counter when converting a MongoDB\BSON\Type instance. Associative arrays and other objects were not protected. This patch adds recursion checking for those types.
Since PHP7 already has macros for working with the apply counter, this patch adds equivalent macros for PHP 5.x.
2016-12-07 10:55:59 -05:00
Jeremy Mikola
8b173d90d9
PHPC-654: Javascript comparison handler
2016-11-28 12:49:12 +01:00
Jeremy Mikola
ae987ca82f
PHPC-654: UTCDateTime comparison handler
2016-11-28 12:49:12 +01:00
Jeremy Mikola
7a12b863ba
PHPC-654: Timestamp comparison handler
2016-11-28 12:49:12 +01:00
Jeremy Mikola
bdb5f3c6ba
PHPC-654: Regex comparison handler
2016-11-28 12:49:12 +01:00
Jeremy Mikola
994a1dac7b
PHPC-654: Binary comparison handler
2016-11-28 12:49:12 +01:00
Jeremy Mikola
94666833cc
PHPC-654: Regression tests for MaxKey and MinKey comparisons
2016-11-28 12:49:12 +01:00
Jeremy Mikola
70d7186d63
PHPC-654: Regression tests for ObjectID comparisons
2016-11-28 12:49:12 +01:00
Jeremy Mikola
5c63b8d229
PHPC-838: Preserve scope when serializing Javascript to BSON
2016-11-28 11:32:01 +00:00