Commit Graph

7 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
Andreas Braun
60febd0f28 PHPC-1699: Ensure all argument parsing errors throw InvalidArgumentException (#1173)
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
2020-10-28 08:20:32 +01:00
Andreas Braun
57a9036782 PHPC-1442: Remove SKIPIF checks for PHP 5 2020-02-11 14:06:10 +01:00
Andreas Braun
cbca0685ca PHPC-1435: Assert against correct error message depending on PHP version 2019-09-02 16:19:33 +02:00
Andreas Braun
b0414d55c6 PHPC-1290: Improve checks for transaction support 2019-09-02 16:19:33 +02:00
Andreas Braun
d03f36227e PHPC-1290: Adapt server selection logic to respect session pinning 2019-08-28 20:10:46 +02:00
Jeremy Mikola
ce2e43ea31 PHPC-1359: Prohibit startTransaction() on sharded clusters
In versions of the driver that do not support mongos pinning, we should prohibit starting a transaction on a sharded cluster (even if the server version might actually support transactions).
2019-06-03 10:30:43 -04:00