Commit Graph

11 Commits

Author SHA1 Message Date
Andreas Braun
deead9687e PHPC-1716 Allow configuring server API version in manager (#1204)
* Introduce MongoDB\Driver\ServerApi

* Accept serverApi driver option

* Introduce create_test_manager factory to create manager

A centralised entry point is required to inject the API_VERSION env variable later.

* Add build variant to test with requireApiVersion=true

* Fix wrong configuration for auth variable

This changed when migrating from our own scripts to drivers-evergreen-tools and was not updated properly, causing all tests to run with auth disabled.

* Declare ZEND_PARSE_PARAMETERS_NONE macro

This macro is missing on PHP < 7.3

* Remove duplicated API param storage

* Add missing semicolons

* Add ZEND_PARSE_PARAMETERS_NON_EX macro

* Extract error handling functionality to separate macros

* Throw if internal mongoc_server_api_t is already initialised

* Use imported namespaces in tools file

* Fix type info for reflection

* Use American English spelling

* Only use typed serialize signature on PHP 8+

* Update PHONGO_PARSE_PARAMETERS_NONE macro for PHP < 7.3

* Remove usage of ZEND_STRL within zend_hash_str_add

This causes compile failures on PHP < 7.3 that I have yet to understand.

* Fix errors in new PHONGO_PARSE_PARAMETERS macros
2021-03-26 15:43:48 +01:00
Jeremy Mikola
58fa85e85e PHPC-1113: Use common URI constant 2018-05-02 16:04:09 -04:00
Jeremy Mikola
5f7f350670 PHPC-1113: Replace NEEDS('STANDALONE') with skip function 2018-05-02 16:04:08 -04:00
Jeremy Mikola
b4062f880c PHPC-1113: Replace CLEANUP() with skip function 2018-05-02 16:04:08 -04:00
Jeremy Mikola
95c4678564 PHPC-1005: Use convert_to_object() to create stdClass from array
This will ensure that the array symtable is properly converted to an object proptable in PHP 7.2 (e.g. integer key 0 converts to string key "0").
2017-09-06 14:14:15 -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
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
20e601a853 PHPC-539: Include read concern in Query debug output 2016-02-10 10:37:51 -05:00
Jeremy Mikola
965f8c3db4 PHPC-315: Support "root" type mapping for top-level documents 2015-07-14 19:52:24 -04:00
Jeremy Mikola
6eb0944565 PHPC-319: Convert top-level documents to stdClass by default
Update tests to expect stdClass for documents. Debug handlers and the Server getter methods will still decode documents as native arrays.
2015-07-11 00:38:05 -04:00
Jeremy Mikola
8cd6db686f PHPC-317: Ensure "sort" query option serializes as BSON object 2015-07-06 15:46:06 -04:00