Commit Graph

3944 Commits

Author SHA1 Message Date
Hannes Magnusson
b5b160cd36 PHPC-213: Disable extra bson type alignment 2015-04-09 15:06:18 -07:00
Hannes Magnusson
f0cd8d1e3a Bumpidy bump 2015-04-09 10:26:40 -07:00
Hannes Magnusson
cd2660bc1a PHPC-233: Mark the ctor as private for internally created value objects 2015-04-09 09:16:42 -07:00
Hannes Magnusson
569c01eb02 PHPC-80: Create distcheck target 2015-04-08 17:49:23 -07:00
Hannes Magnusson
b63315086b Convert int64 that overflow 32bit long to strings
This fixes PHPC-197 along with running the `serverStatus` command
2015-04-08 17:38:17 -07:00
Hannes Magnusson
a222e39869 Convert overflown int64 to strings and print a warning 2015-04-08 17:13:52 -07:00
Hannes Magnusson
815876050f Fix path to tests when executed through pecl run-tests 2015-04-08 15:45:20 -07:00
Hannes Magnusson
98ca229d3f Ignore untracked files in these repos 2015-04-08 14:50:07 -07:00
Hannes Magnusson
3e6ebf54f1 libbson & mongoc seem to have fixed a lot of warnings -- enable all of ours 2015-04-08 14:43:38 -07:00
Hannes Magnusson
73a510d946 Workaround CDRIVER-610 2015-04-08 14:42:56 -07:00
Hannes Magnusson
5494b86255 Apparently there is a function for this! 2015-04-08 14:40:45 -07:00
Hannes Magnusson
6d8f7e9ed2 Fix zts build.. TSRMLS_FETCH_FROM_CTX declares variables and therefore must come first 2015-04-08 12:59:38 -07:00
Hannes Magnusson
69fe06ace8 Remove noop log handler 2015-04-08 12:58:05 -07:00
Hannes Magnusson
0ea1c5e863 PHPC-231: Manager instances should not free streams that are still in use 2015-04-08 12:58:05 -07:00
Hannes Magnusson
d294b60391 bump dependencies for PHPC-231 & PHPC-213 2015-04-08 12:58:05 -07:00
Jeremy Mikola
005d92beb1 PHPC-232: Fix capitalization for WriteResult::getWriteConcern() 2015-04-07 16:37:59 -04:00
Jeremy Mikola
32bdb2b2ed PHPC-231: Regression test for Manager destruct stream freeing 2015-04-07 15:06:36 -04:00
Jeremy Mikola
e5cdd3713a Merge pull request #33 2015-04-06 22:53:41 -04:00
Jeremy Mikola
c32a7cc646 Remove unnecessary php_phongo_cursor_free_current() call
The current element is already freed at the top of this function. After that point, the element could only be intialized from first_batch_iter (after which we return immediately) or if mongoc_cursor_next() returns true (in which case we wouldn't be in this else clause).
2015-04-06 17:31:56 -04:00
Jeremy Mikola
efd91816da Re-use cursor_free_current() in cursor_free()
With this change, all visitor_data.zchild freeing is now done through the same function.
2015-04-06 17:30:21 -04:00
Jeremy Mikola
c454d27d95 PHPC-215: Fix Cursor iteration through IteratorIterator
This removes the invalidate_current handler. Due to SPL's implementation, our handler was being invoked between rewinding and checking if the current position was valid. Given that our validity check depends on inspecting a pointer to the current element (like MySQLi's result iterator), we cannot use invalidate_current.

The current element must still be freed during iteration, so we will instead call a php_phongo_cursor_free_current() function as needed. Additionally, we should track a reference to the Cursor object zval on the iterator itself, which will ensure it is not garbage-collected during iteration (demonstrated in the segfault backtrace in PHPC-215).

Lastly, this commit renames the Cursor object and iterator structs and related functions to be more consistent with implementions in PHP core.
2015-04-06 15:45:19 -04:00
Jeremy Mikola
e2e9d89cb2 PHPC-225: Test Cursor::isDead() and kill on destruct
Testing for kill on destruct is based on PyMongo (see: https://jira.mongodb.org/browse/SERVER-5816?focusedCommentId=201245).
2015-04-06 15:45:19 -04:00
Jeremy Mikola
66193e83bc PHPC-224: Consolidate Result and Cursor classes into one
This class is now simply Traversable (no longer IteratorAggregate) and adds isDead() and getId() methods from the original Cursor class.
2015-04-06 15:45:19 -04:00
Jeremy Mikola
34fff68d85 PHPC-224: Remove Cursor class, which implements Iterator 2015-04-06 15:37:48 -04:00
Hannes Magnusson
266de5c3cf PHPC-207: Correct serialized data examples for ODS documentation 2015-04-03 16:42:37 -07:00
Hannes Magnusson
81de2ca8ff PHPC-210 & PHPC-209 & PHPC-207 Fix BSON ODM/ODS 2015-04-03 16:06:46 -07:00
Hannes Magnusson
86d3a8f798 PHPC-208: Restrict ODS to "__pclass" fieldnames 2015-04-03 15:17:59 -07:00
Hannes Magnusson
848acb01ba PHPC-194: Implement Manager::selectServer() method to wrap SDAM server selection 2015-04-03 14:29:05 -07:00
Hannes Magnusson
b3b3322cb4 In PHP5.3 we hit the __wakeUp() which has slightly different exception 2015-04-03 13:44:53 -07:00
Hannes Magnusson
32ca098154 Merge pull request #34 from serebro/patch-1
Docs small fix
2015-04-03 13:25:25 -07:00
Sergey
bf3befb561 Docs small fix 2015-04-03 23:17:48 +03:00
Hannes Magnusson
69bc19724d PHPC-190: Provide __wakeUp() to disable unserialize() 2015-04-03 13:02:19 -07:00
Hannes Magnusson
45bf77cb2d This apt-get update is slow -- no need to execute it all the time 2015-04-03 12:36:02 -07:00
Hannes Magnusson
1ab97b3bc3 PHPC-191 && PHPC-192: Add verify_expiry && verify_peer_name certificate verify options 2015-04-03 12:19:44 -07:00
Hannes Magnusson
ee9e33148a PHPC-223: Use explicit SSL options rather then stream context
This also adds support for PHPC-185
2015-04-02 16:15:22 -07:00
Hannes Magnusson
22ca99673b Fix setting debug logging as part of the driverOptions 2015-04-02 16:12:52 -07:00
Hannes Magnusson
a31e602cbb Private Public doesn't exists... This is supposed to be private :D 2015-04-02 16:09:15 -07:00
Hannes Magnusson
015aa02d12 Cleanup after test 2015-04-02 09:44:17 -07:00
Hannes Magnusson
9a75c1785e Make it possible to cleanup other db and collections used 2015-04-02 09:40:37 -07:00
Hannes Magnusson
9817e6877e Fix tests when executed outside of srcroot
Fixes running tests with pecl run-tests -p mongodb and on windows
2015-04-01 16:34:56 -07:00
Hannes Magnusson
e1f4c56235 PHPC-222: WriteConcernError can cause segfaults on Ubuntu Precise 32bit 2015-04-01 16:24:29 -07:00
Hannes Magnusson
047de42087 PHPC-220: BSON\UTCDatetime broken on 32bit 2015-04-01 16:16:33 -07:00
Hannes Magnusson
e1e763f88b Fix compile warning on 32bit 2015-04-01 16:15:48 -07:00
Hannes Magnusson
181870d8a4 Fix incompatible pointer type in PHP 5.3
zend_hash.h:214:15: note: expected 'struct HashTable *' but argument is of type 'struct HashTable **'
2015-04-01 16:14:57 -07:00
Hannes Magnusson
c615866b5c Include usable gdbinit 2015-04-01 14:52:24 -07:00
Hannes Magnusson
8992923e7a PHPC-221: Add Ubuntu Precise (12.04.5) 32bit image 2015-04-01 14:52:24 -07:00
Hannes Magnusson
ab8d22c7ff PHPC-219 - BSON\Javascript segfaults on Ubuntu Precise 32bit 2015-04-01 14:52:24 -07:00
Hannes Magnusson
efee6dfee2 PHPC-221: Rename the identifier to precise64 as we'll be adding 32bit soon 2015-04-01 14:52:24 -07:00
Jeremy Mikola
b858c45483 Merge pull request #32 2015-03-31 19:30:18 -04:00
Jeremy Mikola
cf0c882a98 PHPC-204: Result::toArray() should respect type map configuration 2015-03-31 19:29:57 -04:00