Commit Graph

7 Commits

Author SHA1 Message Date
Jeremy Mikola
0e45605fa2 PHPC-1937: Manager::selectServer() defaults to primary read preference (#1267)
* Use .invalid TLD for invalid host in tests

See: https://datatracker.ietf.org/doc/html/rfc2606

* PHPC-1937: Manager::selectServer() defaults to primary read preference
2021-10-26 13:07:21 -04:00
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
0b200dda09 PHPC-1133: Remove unused includes in SKIPIF and FILE sections 2018-02-27 09:48:25 -05:00
Jeremy Mikola
acc06c176d Update expected error message for server selection failures
This message was changed in ed4d53ec87 for CDRIVER-1203.
2016-05-03 13:03:51 -04:00
Jeremy Mikola
016eaf8aa0 PHPC-581: Use ConnectionTimeoutException for server selection failures 2016-02-15 12:41:28 -05:00
Jeremy Mikola
a287ded536 PHPC-553: Relax expected output patterns for HHVM 2016-02-15 12:36:51 -05:00
Jeremy Mikola
cca7d04fef PHPC-553: Suppress warnings during stream creation
This allows PHP's warnings during connection initialization (e.g. unresolvable host names) to be captured into the bson_error_t, which is later used to throw an exception.
2016-02-15 12:36:51 -05:00