Commit Graph

13 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 06c3f342e8 Use exactly representable floating point numbers in tests
CDRIVER-1945 increased the precision when rendering floating point numbers in JavaScript. Using numbers that can be exactly represented in floating point will allow us to keep the expected output consistent with our input.
2017-02-01 23:11:50 -05:00
Jeremy Mikola 7f485f921e PHPC-761: Tests can rely on MongoDB\BSON namespace 2016-08-05 14:06:58 -04:00
Jeremy Mikola 35d53d4504 Remove unnecessary SKIPIFs from BSON tests 2016-08-04 14:03:37 -04:00
Jeremy Mikola 194bbbd164 PHPC-311: Rename from/toArray() functions to from/toPHP() 2015-07-14 19:52:24 -04:00
Jeremy Mikola 06a0f89c98 Update expected float output after libbson bump
bson_to_json() no longer tacks additional zeroes onto floats.
2015-07-06 19:04:42 -04:00
Hannes Magnusson ed1cd1e30b PHPC-309: Bump tests 2015-06-30 10:04:36 -07:00
Hannes Magnusson 227e7842cb Use absolute paths in skipifs too 2015-03-25 14:08:39 -07:00
Hannes Magnusson 1cce49d21c Use absolute paths on in tests so they can run easier on windows 2015-03-25 13:32:09 -07:00
Hannes Magnusson a9823e706f Ignore me. Trim trailing space
This has been annoying me for a long time, especially the '<?php '
2015-02-19 13:57:58 -08:00
Hannes Magnusson 8739a1f777 PHP-1195: Integers are now represented as int32, as long as they fit 2014-12-02 17:20:07 -08:00
Hannes Magnusson a3ce178fae Move BSON encode/decode stuff into BSON namespace
BSON\toArray()
BSON\toJSON()
BSON\fromArray()
BSON\fromJSON()
2014-08-13 21:31:50 +00:00
Hannes Magnusson 08f7aef8b5 Add BSON tests 2014-06-20 14:55:03 -07:00