Skip to content

Commit 27012ad

Browse files
committed
Use individual #if conditions for each stub method
1 parent d4d1afe commit 27012ad

File tree

8 files changed

+125
-111
lines changed

8 files changed

+125
-111
lines changed

src/MongoDB/BulkWrite.stub.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,24 @@ public function count(): int {}
1515

1616
#if PHP_VERSION_ID >= 80000
1717
public function delete(array|object $filter, array $deleteOptions = []): void {}
18-
19-
public final function insert(array|object $document): mixed {}
20-
21-
public function update(array|object $filter, array|object $newObj, array $updateOptions = []): void {}
2218
#else
2319
/** @param array|object $filter */
2420
public function delete($filter, array $deleteOptions = []): void {}
21+
#endif
2522

23+
#if PHP_VERSION_ID >= 80000
24+
public final function insert(array|object $document): mixed {}
25+
#else
2626
/**
2727
* @param array|object $document
2828
* @return mixed
2929
*/
3030
public final function insert($document) {}
31+
#endif
3132

33+
#if PHP_VERSION_ID >= 80000
34+
public function update(array|object $filter, array|object $newObj, array $updateOptions = []): void {}
35+
#else
3236
/**
3337
* @param array|object $filter
3438
* @param array|object $newObj

src/MongoDB/BulkWrite_arginfo.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 5b71b311ea4be170595b7616bf02af21b1379b1c */
2+
* Stub hash: ccb88a8730d28fed822df1f0585988886dd806cb */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite___construct, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
@@ -15,30 +15,30 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_d
1515
ZEND_END_ARG_INFO()
1616
#endif
1717

18-
#if PHP_VERSION_ID >= 80000
19-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_insert, 0, 1, IS_MIXED, 0)
20-
ZEND_ARG_TYPE_MASK(0, document, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
18+
#if !(PHP_VERSION_ID >= 80000)
19+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_delete, 0, 1, IS_VOID, 0)
20+
ZEND_ARG_INFO(0, filter)
21+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deleteOptions, IS_ARRAY, 0, "[]")
2122
ZEND_END_ARG_INFO()
2223
#endif
2324

2425
#if PHP_VERSION_ID >= 80000
25-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_update, 0, 2, IS_VOID, 0)
26-
ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
27-
ZEND_ARG_TYPE_MASK(0, newObj, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
28-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, updateOptions, IS_ARRAY, 0, "[]")
26+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_insert, 0, 1, IS_MIXED, 0)
27+
ZEND_ARG_TYPE_MASK(0, document, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
2928
ZEND_END_ARG_INFO()
3029
#endif
3130

3231
#if !(PHP_VERSION_ID >= 80000)
33-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_delete, 0, 1, IS_VOID, 0)
34-
ZEND_ARG_INFO(0, filter)
35-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deleteOptions, IS_ARRAY, 0, "[]")
32+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_insert, 0, 0, 1)
33+
ZEND_ARG_INFO(0, document)
3634
ZEND_END_ARG_INFO()
3735
#endif
3836

39-
#if !(PHP_VERSION_ID >= 80000)
40-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_insert, 0, 0, 1)
41-
ZEND_ARG_INFO(0, document)
37+
#if PHP_VERSION_ID >= 80000
38+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_BulkWrite_update, 0, 2, IS_VOID, 0)
39+
ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
40+
ZEND_ARG_TYPE_MASK(0, newObj, MAY_BE_ARRAY|MAY_BE_OBJECT, NULL)
41+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, updateOptions, IS_ARRAY, 0, "[]")
4242
ZEND_END_ARG_INFO()
4343
#endif
4444

@@ -56,18 +56,18 @@ static ZEND_METHOD(MongoDB_Driver_BulkWrite, count);
5656
#if PHP_VERSION_ID >= 80000
5757
static ZEND_METHOD(MongoDB_Driver_BulkWrite, delete);
5858
#endif
59-
#if PHP_VERSION_ID >= 80000
60-
static ZEND_METHOD(MongoDB_Driver_BulkWrite, insert);
61-
#endif
62-
#if PHP_VERSION_ID >= 80000
63-
static ZEND_METHOD(MongoDB_Driver_BulkWrite, update);
64-
#endif
6559
#if !(PHP_VERSION_ID >= 80000)
6660
static ZEND_METHOD(MongoDB_Driver_BulkWrite, delete);
6761
#endif
62+
#if PHP_VERSION_ID >= 80000
63+
static ZEND_METHOD(MongoDB_Driver_BulkWrite, insert);
64+
#endif
6865
#if !(PHP_VERSION_ID >= 80000)
6966
static ZEND_METHOD(MongoDB_Driver_BulkWrite, insert);
7067
#endif
68+
#if PHP_VERSION_ID >= 80000
69+
static ZEND_METHOD(MongoDB_Driver_BulkWrite, update);
70+
#endif
7171
#if !(PHP_VERSION_ID >= 80000)
7272
static ZEND_METHOD(MongoDB_Driver_BulkWrite, update);
7373
#endif
@@ -79,18 +79,18 @@ static const zend_function_entry class_MongoDB_Driver_BulkWrite_methods[] = {
7979
#if PHP_VERSION_ID >= 80000
8080
ZEND_ME(MongoDB_Driver_BulkWrite, delete, arginfo_class_MongoDB_Driver_BulkWrite_delete, ZEND_ACC_PUBLIC)
8181
#endif
82-
#if PHP_VERSION_ID >= 80000
83-
ZEND_ME(MongoDB_Driver_BulkWrite, insert, arginfo_class_MongoDB_Driver_BulkWrite_insert, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
84-
#endif
85-
#if PHP_VERSION_ID >= 80000
86-
ZEND_ME(MongoDB_Driver_BulkWrite, update, arginfo_class_MongoDB_Driver_BulkWrite_update, ZEND_ACC_PUBLIC)
87-
#endif
8882
#if !(PHP_VERSION_ID >= 80000)
8983
ZEND_ME(MongoDB_Driver_BulkWrite, delete, arginfo_class_MongoDB_Driver_BulkWrite_delete, ZEND_ACC_PUBLIC)
9084
#endif
85+
#if PHP_VERSION_ID >= 80000
86+
ZEND_ME(MongoDB_Driver_BulkWrite, insert, arginfo_class_MongoDB_Driver_BulkWrite_insert, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
87+
#endif
9188
#if !(PHP_VERSION_ID >= 80000)
9289
ZEND_ME(MongoDB_Driver_BulkWrite, insert, arginfo_class_MongoDB_Driver_BulkWrite_insert, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
9390
#endif
91+
#if PHP_VERSION_ID >= 80000
92+
ZEND_ME(MongoDB_Driver_BulkWrite, update, arginfo_class_MongoDB_Driver_BulkWrite_update, ZEND_ACC_PUBLIC)
93+
#endif
9494
#if !(PHP_VERSION_ID >= 80000)
9595
ZEND_ME(MongoDB_Driver_BulkWrite, update, arginfo_class_MongoDB_Driver_BulkWrite_update, ZEND_ACC_PUBLIC)
9696
#endif

src/MongoDB/ClientEncryption.stub.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ final public function createDataKey(string $kmsProvider, array $options = []): \
4545

4646
#if PHP_VERSION_ID >= 80000
4747
final public function decrypt(\MongoDB\BSON\Binary $value): mixed {}
48-
49-
final public function encrypt(mixed $value, array $options = []): \MongoDB\BSON\Binary {}
5048
#else
5149
/** @return mixed */
5250
final public function decrypt(\MongoDB\BSON\Binary $value) {}
51+
#endif
5352

53+
#if PHP_VERSION_ID >= 80000
54+
final public function encrypt(mixed $value, array $options = []): \MongoDB\BSON\Binary {}
55+
#else
5456
/** @param mixed $value */
5557
final public function encrypt($value, array $options = []): \MongoDB\BSON\Binary {}
5658
#endif

src/MongoDB/ClientEncryption_arginfo.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 8392a8f5e4e35893ddc65082a91cef47dde7facf */
2+
* Stub hash: d8e3bd42058296c2e67ff7107d08694de7164fdd */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_ClientEncryption___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0)
@@ -16,19 +16,19 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_Driver_ClientEncry
1616
ZEND_END_ARG_INFO()
1717
#endif
1818

19+
#if !(PHP_VERSION_ID >= 80000)
20+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_ClientEncryption_decrypt, 0, 0, 1)
21+
ZEND_ARG_OBJ_INFO(0, value, MongoDB\\BSON\\Binary, 0)
22+
ZEND_END_ARG_INFO()
23+
#endif
24+
1925
#if PHP_VERSION_ID >= 80000
2026
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_ClientEncryption_encrypt, 0, 1, MongoDB\\BSON\\Binary, 0)
2127
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
2228
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
2329
ZEND_END_ARG_INFO()
2430
#endif
2531

26-
#if !(PHP_VERSION_ID >= 80000)
27-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_ClientEncryption_decrypt, 0, 0, 1)
28-
ZEND_ARG_OBJ_INFO(0, value, MongoDB\\BSON\\Binary, 0)
29-
ZEND_END_ARG_INFO()
30-
#endif
31-
3232
#if !(PHP_VERSION_ID >= 80000)
3333
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_ClientEncryption_encrypt, 0, 1, MongoDB\\BSON\\Binary, 0)
3434
ZEND_ARG_INFO(0, value)
@@ -42,12 +42,12 @@ static ZEND_METHOD(MongoDB_Driver_ClientEncryption, createDataKey);
4242
#if PHP_VERSION_ID >= 80000
4343
static ZEND_METHOD(MongoDB_Driver_ClientEncryption, decrypt);
4444
#endif
45-
#if PHP_VERSION_ID >= 80000
46-
static ZEND_METHOD(MongoDB_Driver_ClientEncryption, encrypt);
47-
#endif
4845
#if !(PHP_VERSION_ID >= 80000)
4946
static ZEND_METHOD(MongoDB_Driver_ClientEncryption, decrypt);
5047
#endif
48+
#if PHP_VERSION_ID >= 80000
49+
static ZEND_METHOD(MongoDB_Driver_ClientEncryption, encrypt);
50+
#endif
5151
#if !(PHP_VERSION_ID >= 80000)
5252
static ZEND_METHOD(MongoDB_Driver_ClientEncryption, encrypt);
5353
#endif
@@ -59,12 +59,12 @@ static const zend_function_entry class_MongoDB_Driver_ClientEncryption_methods[]
5959
#if PHP_VERSION_ID >= 80000
6060
ZEND_ME(MongoDB_Driver_ClientEncryption, decrypt, arginfo_class_MongoDB_Driver_ClientEncryption_decrypt, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
6161
#endif
62-
#if PHP_VERSION_ID >= 80000
63-
ZEND_ME(MongoDB_Driver_ClientEncryption, encrypt, arginfo_class_MongoDB_Driver_ClientEncryption_encrypt, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
64-
#endif
6562
#if !(PHP_VERSION_ID >= 80000)
6663
ZEND_ME(MongoDB_Driver_ClientEncryption, decrypt, arginfo_class_MongoDB_Driver_ClientEncryption_decrypt, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
6764
#endif
65+
#if PHP_VERSION_ID >= 80000
66+
ZEND_ME(MongoDB_Driver_ClientEncryption, encrypt, arginfo_class_MongoDB_Driver_ClientEncryption_encrypt, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
67+
#endif
6868
#if !(PHP_VERSION_ID >= 80000)
6969
ZEND_ME(MongoDB_Driver_ClientEncryption, encrypt, arginfo_class_MongoDB_Driver_ClientEncryption_encrypt, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
7070
#endif

src/MongoDB/Manager.stub.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@ final public function createClientEncryption(array $options): ClientEncryption {
1717

1818
#if PHP_VERSION_ID >= 80000
1919
final public function executeBulkWrite(string $namespace, BulkWrite $bulk, array|WriteConcern|null $options = null): WriteResult {}
20-
21-
final public function executeCommand(string $db, Command $command, array|ReadPreference|null $options = null): Cursor {}
22-
23-
final public function executeQuery(string $namespace, Query $query, array|ReadPreference|null $options = null): Cursor {}
2420
#else
2521
/** @param array|WriteConcern|null $options */
2622
final public function executeBulkWrite(string $namespace, BulkWrite $bulk, $options = null): WriteResult {}
23+
#endif
2724

25+
#if PHP_VERSION_ID >= 80000
26+
final public function executeCommand(string $db, Command $command, array|ReadPreference|null $options = null): Cursor {}
27+
#else
2828
/** @param array|ReadPreference|null $options */
2929
final public function executeCommand(string $db, Command $command, $options = null): Cursor {}
30+
#endif
3031

32+
#if PHP_VERSION_ID >= 80000
33+
final public function executeQuery(string $namespace, Query $query, array|ReadPreference|null $options = null): Cursor {}
34+
#else
3135
/** @param array|ReadPreference|null $options */
3236
final public function executeQuery(string $namespace, Query $query, $options = null): Cursor {}
3337
#endif

src/MongoDB/Manager_arginfo.h

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: c1c455c0a5c5622aa3ef8972f7911e653d01c997 */
2+
* Stub hash: 516a26c70864397ba986d9855f4f876fe84bceb9 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_Driver_Manager___construct, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null")
@@ -23,22 +23,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_exec
2323
ZEND_END_ARG_INFO()
2424
#endif
2525

26-
#if PHP_VERSION_ID >= 80000
27-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeCommand, 0, 2, MongoDB\\Driver\\Cursor, 0)
28-
ZEND_ARG_TYPE_INFO(0, db, IS_STRING, 0)
29-
ZEND_ARG_OBJ_INFO(0, command, MongoDB\\Driver\\Command, 0)
30-
ZEND_ARG_OBJ_TYPE_MASK(0, options, MongoDB\\Driver\\ReadPreference, MAY_BE_ARRAY|MAY_BE_NULL, "null")
31-
ZEND_END_ARG_INFO()
32-
#endif
33-
34-
#if PHP_VERSION_ID >= 80000
35-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeQuery, 0, 2, MongoDB\\Driver\\Cursor, 0)
36-
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
37-
ZEND_ARG_OBJ_INFO(0, query, MongoDB\\Driver\\Query, 0)
38-
ZEND_ARG_OBJ_TYPE_MASK(0, options, MongoDB\\Driver\\ReadPreference, MAY_BE_ARRAY|MAY_BE_NULL, "null")
39-
ZEND_END_ARG_INFO()
40-
#endif
41-
4226
#if !(PHP_VERSION_ID >= 80000)
4327
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeBulkWrite, 0, 2, MongoDB\\Driver\\WriteResult, 0)
4428
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
@@ -47,6 +31,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_exec
4731
ZEND_END_ARG_INFO()
4832
#endif
4933

34+
#if PHP_VERSION_ID >= 80000
35+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeCommand, 0, 2, MongoDB\\Driver\\Cursor, 0)
36+
ZEND_ARG_TYPE_INFO(0, db, IS_STRING, 0)
37+
ZEND_ARG_OBJ_INFO(0, command, MongoDB\\Driver\\Command, 0)
38+
ZEND_ARG_OBJ_TYPE_MASK(0, options, MongoDB\\Driver\\ReadPreference, MAY_BE_ARRAY|MAY_BE_NULL, "null")
39+
ZEND_END_ARG_INFO()
40+
#endif
41+
5042
#if !(PHP_VERSION_ID >= 80000)
5143
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeCommand, 0, 2, MongoDB\\Driver\\Cursor, 0)
5244
ZEND_ARG_TYPE_INFO(0, db, IS_STRING, 0)
@@ -55,6 +47,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_exec
5547
ZEND_END_ARG_INFO()
5648
#endif
5749

50+
#if PHP_VERSION_ID >= 80000
51+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeQuery, 0, 2, MongoDB\\Driver\\Cursor, 0)
52+
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
53+
ZEND_ARG_OBJ_INFO(0, query, MongoDB\\Driver\\Query, 0)
54+
ZEND_ARG_OBJ_TYPE_MASK(0, options, MongoDB\\Driver\\ReadPreference, MAY_BE_ARRAY|MAY_BE_NULL, "null")
55+
ZEND_END_ARG_INFO()
56+
#endif
57+
5858
#if !(PHP_VERSION_ID >= 80000)
5959
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_MongoDB_Driver_Manager_executeQuery, 0, 2, MongoDB\\Driver\\Cursor, 0)
6060
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
@@ -115,18 +115,18 @@ static ZEND_METHOD(MongoDB_Driver_Manager, createClientEncryption);
115115
#if PHP_VERSION_ID >= 80000
116116
static ZEND_METHOD(MongoDB_Driver_Manager, executeBulkWrite);
117117
#endif
118-
#if PHP_VERSION_ID >= 80000
119-
static ZEND_METHOD(MongoDB_Driver_Manager, executeCommand);
120-
#endif
121-
#if PHP_VERSION_ID >= 80000
122-
static ZEND_METHOD(MongoDB_Driver_Manager, executeQuery);
123-
#endif
124118
#if !(PHP_VERSION_ID >= 80000)
125119
static ZEND_METHOD(MongoDB_Driver_Manager, executeBulkWrite);
126120
#endif
121+
#if PHP_VERSION_ID >= 80000
122+
static ZEND_METHOD(MongoDB_Driver_Manager, executeCommand);
123+
#endif
127124
#if !(PHP_VERSION_ID >= 80000)
128125
static ZEND_METHOD(MongoDB_Driver_Manager, executeCommand);
129126
#endif
127+
#if PHP_VERSION_ID >= 80000
128+
static ZEND_METHOD(MongoDB_Driver_Manager, executeQuery);
129+
#endif
130130
#if !(PHP_VERSION_ID >= 80000)
131131
static ZEND_METHOD(MongoDB_Driver_Manager, executeQuery);
132132
#endif
@@ -156,18 +156,18 @@ static const zend_function_entry class_MongoDB_Driver_Manager_methods[] = {
156156
#if PHP_VERSION_ID >= 80000
157157
ZEND_ME(MongoDB_Driver_Manager, executeBulkWrite, arginfo_class_MongoDB_Driver_Manager_executeBulkWrite, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
158158
#endif
159-
#if PHP_VERSION_ID >= 80000
160-
ZEND_ME(MongoDB_Driver_Manager, executeCommand, arginfo_class_MongoDB_Driver_Manager_executeCommand, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
161-
#endif
162-
#if PHP_VERSION_ID >= 80000
163-
ZEND_ME(MongoDB_Driver_Manager, executeQuery, arginfo_class_MongoDB_Driver_Manager_executeQuery, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
164-
#endif
165159
#if !(PHP_VERSION_ID >= 80000)
166160
ZEND_ME(MongoDB_Driver_Manager, executeBulkWrite, arginfo_class_MongoDB_Driver_Manager_executeBulkWrite, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
167161
#endif
162+
#if PHP_VERSION_ID >= 80000
163+
ZEND_ME(MongoDB_Driver_Manager, executeCommand, arginfo_class_MongoDB_Driver_Manager_executeCommand, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
164+
#endif
168165
#if !(PHP_VERSION_ID >= 80000)
169166
ZEND_ME(MongoDB_Driver_Manager, executeCommand, arginfo_class_MongoDB_Driver_Manager_executeCommand, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
170167
#endif
168+
#if PHP_VERSION_ID >= 80000
169+
ZEND_ME(MongoDB_Driver_Manager, executeQuery, arginfo_class_MongoDB_Driver_Manager_executeQuery, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
170+
#endif
171171
#if !(PHP_VERSION_ID >= 80000)
172172
ZEND_ME(MongoDB_Driver_Manager, executeQuery, arginfo_class_MongoDB_Driver_Manager_executeQuery, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
173173
#endif

src/MongoDB/Server.stub.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,21 @@ final private function __construct() {}
7373

7474
#if PHP_VERSION_ID >= 80000
7575
final public function executeBulkWrite(string $namespace, BulkWrite $zwrite, array|WriteConcern|null $options = null): WriteResult {}
76-
77-
final public function executeCommand(string $db, Command $command, array|ReadPreference|null $options = null): Cursor {}
78-
79-
final public function executeQuery(string $namespace, Query $query, array|ReadPreference|null $options = null): Cursor {}
8076
#else
8177
/** @param array|WriteConcern|null $options */
8278
final public function executeBulkWrite(string $namespace, BulkWrite $zwrite, $options = null): WriteResult {}
79+
#endif
8380

81+
#if PHP_VERSION_ID >= 80000
82+
final public function executeCommand(string $db, Command $command, array|ReadPreference|null $options = null): Cursor {}
83+
#else
8484
/** @param array|ReadPreference|null $options */
8585
final public function executeCommand(string $db, Command $command, $options = null): Cursor {}
86+
#endif
8687

88+
#if PHP_VERSION_ID >= 80000
89+
final public function executeQuery(string $namespace, Query $query, array|ReadPreference|null $options = null): Cursor {}
90+
#else
8791
/** @param array|ReadPreference|null $options */
8892
final public function executeQuery(string $namespace, Query $query, $options = null): Cursor {}
8993
#endif

0 commit comments

Comments
 (0)