313 Commits

Author SHA1 Message Date
Jeremy Mikola
24ed8326b9 PHPC-529: Prefix BSON functions to avoid symbol conflicts 2016-01-06 13:57:42 -05:00
Derick Rethans
c0d4f60a1d Fixed issues with PHP 7 and the new ReadConcern 2015-12-18 16:15:40 +00:00
Joe Watkins
c4f69e810c fix leaks and logical errors for PHP 7 2015-12-18 16:15:40 +00:00
Jeremy Mikola
9047b3d27b PHPC-390: Fix OnUpdateString calls within OnUpdateDebug 2015-12-16 10:22:58 +00:00
Jeremy Mikola
29bf3381e5 PHPC-374: zend_string updates for OnUpdateDebug 2015-12-16 10:22:58 +00:00
Jeremy Mikola
df74d6dae1 PHPC-404: Additional hash API changes
Since ADD_ASSOC_STRINGL() always duplicates, use a static buffer in UTCDateTime's debug handler when converting milliseconds to a string on 32-bit platforms.
2015-12-16 10:22:58 +00:00
Jeremy Mikola
52e5bb9e01 PHPC-369: Additional Z_<CLASSNAME>_OBJ_P() macros 2015-12-16 10:22:58 +00:00
Hannes Magnusson
46f60021b9 PHPC-431: Segfault when using Manager through singleton class 2015-12-16 10:22:58 +00:00
Hannes Magnusson
75ceeaf7c1 PHPC-391 & PHPC-389: Stream and SSL API changes 2015-12-16 10:22:58 +00:00
Hannes Magnusson
f1372c8361 PHPC-387: Properly init the iterator, and don't free it on dtor 2015-12-16 10:22:58 +00:00
Hannes Magnusson
6f6900fee9 PHPC-405: zval drop a level; zval*->zval, zval**->zval* 2015-12-16 10:22:58 +00:00
Hannes Magnusson
390b6fca5a PHPC-404: off-by-one hash api changes 2015-12-16 10:22:58 +00:00
Hannes Magnusson
615ce0c87d PHPC-390: php.ini updates 2015-12-16 10:21:33 +00:00
Hannes Magnusson
e8ba12bd2b hash API changes, off-by-ones 2015-12-16 10:21:33 +00:00
Hannes Magnusson
3c19775997 PHPC-385: Remove leftover braces 2015-12-16 10:19:30 +00:00
Hannes Magnusson
41ede51ea1 Sprinkle TODOs -- it compiles now! 2015-12-16 10:19:30 +00:00
Hannes Magnusson
07b81a68ed PHPC-374: php_stream_xport_create() now wants zend_string 2015-12-16 10:19:30 +00:00
Hannes Magnusson
4920cd7cfd PHPC-388 - dtor on bson_to_zval() failure 2015-12-16 10:19:30 +00:00
Hannes Magnusson
720cc357b1 PHPC-387: Iterator API changes 2015-12-16 10:19:30 +00:00
Hannes Magnusson
d1ad604c11 PHPC-386: Forward port Z_PHPDATE_P() to get php_date_obj 2015-12-16 10:19:30 +00:00
Hannes Magnusson
4cdad82540 PHPC-385: add_assoc_string_ex() doesn't have a duplicate param in PHP7 2015-12-16 10:19:30 +00:00
Hannes Magnusson
5d6d0d1a2c PHPC-384: php_stream's no longer have resource ids 2015-12-16 10:19:30 +00:00
Hannes Magnusson
8ee01788d1 PHPC-376: Cursor var_dump() is weird
Refactor so it mimicks all the other <type>_to_zval()
Also gets rid of MAKE_STD_ZVAL() for PHPC-373
2015-12-16 10:19:30 +00:00
Hannes Magnusson
342c62747c PHPC-373: Remove MAKE_STD_ZVAL() usage
This simplifies calling bson_to_zval() quite a bit.

bson_to_zval() now takes empty zval*
bson_to_zval_ex() now takes php_phongo_bson_state (with empty zval*)

bson_to_zval() will always alloc and init state.zchild
2015-12-16 10:15:28 +00:00
Hannes Magnusson
8d97a3a4eb PHPC-374: zend_string* vs char* PHP API changes (1/many) 2015-12-16 10:15:28 +00:00
Hannes Magnusson
846a92f46d PHPC-375: TSRMLS_FETCH_FROM_CTX() not applicable in PHP7
TSRMLS_FETCH_FROM_CTX() still dose the assignment in PHP7, which leads
to compiler warning since we don't actually use it
2015-12-16 10:15:28 +00:00
Hannes Magnusson
61e43e3b87 PHPC-372: zend_throw_exception() return value changes 2015-12-16 10:15:28 +00:00
Hannes Magnusson
7f9343a877 PHPC-371: Prep for PHP7 resource changes 2015-12-16 10:15:28 +00:00
Hannes Magnusson
13a256e2a9 PHPC-369: Use the new Z_<CLASSNAME>_OBJ_P() macros 2015-12-16 10:13:51 +00:00
Hannes Magnusson
4c918b8e02 PHPC-368: Refactor MongoDB\Driver\Manager ctor 2015-12-16 10:10:31 +00:00
Hannes Magnusson
f912475b83 PHPC-512: Disable async stream connections
When doing async connections we can't properly determine if we should connect over IPv6 or IPv4. PHP will unfortunately default to connecting over IPv6 (when compiled in support, with minor runtime check), while mongod does not support IPv6 by default.

When then creating the IPv6 connection asynchronously, PHP hits EINPROGRESS and will happily return the socket as valid.

There currently is no way to configure these functions to prefer IPv4. The best we can do for now is to not connect asynchronously as then we'll properly discover that the IPv6 socket failed, and then continue through the list of addrinfo and next pickup the IPv4 address which works.

Fixes #133
2015-12-14 14:58:00 -05:00
Jeremy Mikola
3ad2ace6f2 PHPC-508: Construct valid stream URI for IPv6 literals 2015-12-14 13:21:38 -05:00
Jeremy Mikola
12e6907e41 PHPC-448: Support readConcern option on Query 2015-12-11 15:22:55 -05:00
Jeremy Mikola
92348caffc PHPC-448: Implement ReadConcern class 2015-12-11 14:44:59 -05:00
Derick Rethans
76fce748c4 Use more descriptive unused value 2015-12-10 11:14:36 +00:00
Hannes Magnusson
85b437a1f7 Fixed PHPC-502: bson_init_static(): precondition failed: data 2015-12-10 11:14:12 +00:00
Hannes Magnusson
49225e1dc7 PHPC-495: Upgrade bundled libbson and libmongoc to 1.3.0 2015-12-02 18:11:46 +00:00
Derick Rethans
e529d3007b Renamed struct members due to changes in libmongoc 2015-12-02 18:11:46 +00:00
Derick Rethans
74ed943585 mongoc_cursor_cursorid_init takes an extra bson_error 2015-12-02 18:11:46 +00:00
Hannes Magnusson
eaeb31e297 PHPC-487: Reverse logic in check_closed stream handler
The return value of the check_closed handler is true if the stream is closed.
2015-11-30 12:28:40 -05:00
Jeremy Mikola
70c092f379 PHPC-465: Remove WriteConcernException and WriteErrorException
These exceptions were only used by the single write methods.
2015-10-21 23:42:40 -04:00
Jeremy Mikola
fe9fb63267 PHPC-465: Remove Manager's single write methods
Existing tests for single write methods were ported to executeBulkWrite() tests.
2015-10-21 19:32:42 -04:00
Jeremy Mikola
011c0c264c PHPC-440: WriteErrorException extends abstract WriteException
This makes WriteException a common base class of WriteConcernException and WriteErrorException. BulkWriteException, which may contain multiple write and/or write concern errors, will continue to inherit WriteException.
2015-10-21 19:32:42 -04:00
Jeremy Mikola
15a9f709d2 PHPC-462: Remove unused DuplicateKeyException
This class was not being used, since executeBulkWrite() uses BulkWriteException and the single write methods use WriteException and WriteConcernException exclusively.
2015-10-20 12:23:38 -04:00
Hannes Magnusson
98dc85a140 PHPC-256: Productions debug logs 2015-10-07 14:15:54 -07:00
Hannes Magnusson
9c0d40424f Make sure we have the X509 declaration we need 2015-10-07 13:41:51 -07:00
Hannes Magnusson
3740eaa9e0 No need for TSRMLS here -- no calls to PHP at all 2015-10-07 13:41:51 -07:00
Jeremy Mikola
59177872a8 Avoid nested macros when reporting runtime version in debug mode
This appeared to work in GCC but caused compilation errors on Windows. Related to: 2f750b0c141a814a6455f666583c28601be1c29d
2015-10-06 01:45:33 -04:00
Remi Collet
aeb2bc4669 PHPC-442: report PHP version in debug info 2015-10-05 17:28:23 -04:00
Remi Collet
efde19a1de report runtime version in debug mode 2015-10-05 17:28:23 -04:00