Commit Graph

21 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 05c83bdef2 PHPC-1132: Remove HHVM checks in test suite 2018-02-27 09:48:25 -05: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 331d387bb2 Revert "PHPC-977: Update tests for expected JSON output from libbson"
This reverts commit 2761072d24.
2017-07-28 13:30:06 -04:00
Jeremy Mikola 2761072d24 PHPC-977: Update tests for expected JSON output from libbson
Extended JSON output for libbson changed in CDRIVER-2128.
2017-07-11 11:39:44 -04: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 d8f6ad276f PHPC-629: Fix $binary and $type field in extended JSON
The order of these fields was changed by CDRIVER-1340 (in libbson 1.4.0-beta1).
2016-07-29 17:41:17 -04:00
Derick Rethans 298488f8d6 Disable test that dumps hex codes for generated BSON
There is an equivalent test in Hippo:
tests/bson-serialize-002.phpt which tests the same, with the __pclass encoded
last.
2015-09-02 18:07:41 +01:00
Jeremy Mikola 194bbbd164 PHPC-311: Rename from/toArray() functions to from/toPHP() 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 d34a09edf1 Use plural property name to store list of Address objects 2015-07-10 23:55:50 -04:00
Hannes Magnusson ed1cd1e30b PHPC-309: Bump tests 2015-06-30 10:04:36 -07:00
Hannes Magnusson 0afcb348dd PHPC-249: empty array should be serialized as array 2015-04-16 13:46:58 -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 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 af80d64193 PHPC-42: Implement root level (full document) ODM style serialization 2015-01-05 14:32:11 -08:00
Hannes Magnusson 148e726e26 PHPC-42: BSON Serialization for classes
This is a basic ODM.
When a class implements the BSON\Persistable interface gets bson
encoded we will embed a __ binary(type=0x80) value into the document.
Upon bson decoding a document, if we find that binary type convert that
document/array into the php class
2015-01-02 11:08:40 -08:00