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
fc8b862c09 PHPC-1113: Allow extra output for replica sets 2018-05-02 16:45:02 -04: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
427854e092 PHPC-1152: Create implicit session for commands
This ensures that phongo_execute_command creates an implicit session (if supported and not explicit session was provided). In turn, this ensures that any command cursor shares the same session as its originating command.

By creating a Session object, we can ensure that the implicit session is destroyed during garbage collection when the last reference is removed.
2018-04-18 14:36:39 -04:00
Jeremy Mikola
cc90304658 PHPC-1151: Add Session to Cursor debug output 2018-04-16 11:28:21 -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
c0046a3e63 PHPC-673: Fix Cursor::isDead() tests for mongoc_cursor_is_alive()
This changes our tests based on upstream fixes for mongoc_cursor_is_alive() in CDRIVER-1221.
2016-05-17 16:12:13 -04:00
Jeremy Mikola
78839bde83 PHPC-688: Change Cursor debug handler to use libmongoc public API
This significantly alters the structure of the Cursor's debug output, since we not longer have access to private fields within mongoc_cursor_t.
2016-05-06 11:48:31 -04:00
Hannes Magnusson
49225e1dc7 PHPC-495: Upgrade bundled libbson and libmongoc to 1.3.0 2015-12-02 18:11:46 +00: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
Hannes Magnusson
131658e8fa Improve test organization 2015-05-13 19:52:31 -07:00