Skip to content

Commit 2b03e66

Browse files
authored
PHPC-2128: Create stub file for functions (#1349)
* PHPC-2128: Create stub file for functions * Fix wrong phpdoc comment formatting
1 parent de5f1e5 commit 2b03e66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+237
-206
lines changed

php_phongo.c

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
#include "src/phongo_client.h"
2929
#include "src/phongo_error.h"
3030
#include "src/phongo_ini.h"
31-
#include "src/BSON/functions.h"
32-
#include "src/MongoDB/Monitoring/functions.h"
31+
#include "src/functions_arginfo.h"
3332

3433
ZEND_DECLARE_MODULE_GLOBALS(mongodb)
3534
#if defined(ZTS) && defined(COMPILE_DL_MONGODB)
@@ -483,42 +482,7 @@ PHP_FUNCTION(MongoDB_disabled___wakeup) /* {{{ */
483482
} /* }}} */
484483
/* }}} */
485484

486-
/* {{{ Extension functions, module dependencies, and module entry */
487-
ZEND_BEGIN_ARG_INFO_EX(ai_bson_fromPHP, 0, 0, 1)
488-
ZEND_ARG_INFO(0, value)
489-
ZEND_END_ARG_INFO();
490-
491-
ZEND_BEGIN_ARG_INFO_EX(ai_bson_toPHP, 0, 0, 1)
492-
ZEND_ARG_INFO(0, bson)
493-
ZEND_ARG_ARRAY_INFO(0, typemap, 0)
494-
ZEND_END_ARG_INFO();
495-
496-
ZEND_BEGIN_ARG_INFO_EX(ai_bson_toJSON, 0, 0, 1)
497-
ZEND_ARG_INFO(0, bson)
498-
ZEND_END_ARG_INFO();
499-
500-
ZEND_BEGIN_ARG_INFO_EX(ai_bson_fromJSON, 0, 0, 1)
501-
ZEND_ARG_INFO(0, json)
502-
ZEND_END_ARG_INFO();
503-
504-
ZEND_BEGIN_ARG_INFO_EX(ai_mongodb_driver_monitoring_subscriber, 0, 0, 1)
505-
ZEND_ARG_OBJ_INFO(0, subscriber, MongoDB\\Driver\\Monitoring\\Subscriber, 0)
506-
ZEND_END_ARG_INFO();
507-
508-
static const zend_function_entry mongodb_functions[] = {
509-
/* clang-format off */
510-
ZEND_NS_NAMED_FE("MongoDB\\BSON", fromPHP, PHP_FN(MongoDB_BSON_fromPHP), ai_bson_fromPHP)
511-
ZEND_NS_NAMED_FE("MongoDB\\BSON", toPHP, PHP_FN(MongoDB_BSON_toPHP), ai_bson_toPHP)
512-
ZEND_NS_NAMED_FE("MongoDB\\BSON", toJSON, PHP_FN(MongoDB_BSON_toJSON), ai_bson_toJSON)
513-
ZEND_NS_NAMED_FE("MongoDB\\BSON", toCanonicalExtendedJSON, PHP_FN(MongoDB_BSON_toCanonicalExtendedJSON), ai_bson_toJSON)
514-
ZEND_NS_NAMED_FE("MongoDB\\BSON", toRelaxedExtendedJSON, PHP_FN(MongoDB_BSON_toRelaxedExtendedJSON), ai_bson_toJSON)
515-
ZEND_NS_NAMED_FE("MongoDB\\BSON", fromJSON, PHP_FN(MongoDB_BSON_fromJSON), ai_bson_fromJSON)
516-
ZEND_NS_NAMED_FE("MongoDB\\Driver\\Monitoring", addSubscriber, PHP_FN(MongoDB_Driver_Monitoring_addSubscriber), ai_mongodb_driver_monitoring_subscriber)
517-
ZEND_NS_NAMED_FE("MongoDB\\Driver\\Monitoring", removeSubscriber, PHP_FN(MongoDB_Driver_Monitoring_removeSubscriber), ai_mongodb_driver_monitoring_subscriber)
518-
PHP_FE_END
519-
/* clang-format on */
520-
};
521-
485+
/* {{{ Module dependencies and module entry */
522486
static const zend_module_dep mongodb_deps[] = {
523487
/* clang-format off */
524488
ZEND_MOD_REQUIRED("date")
@@ -534,7 +498,7 @@ zend_module_entry mongodb_module_entry = {
534498
NULL,
535499
mongodb_deps,
536500
"mongodb",
537-
mongodb_functions,
501+
ext_functions,
538502
PHP_MINIT(mongodb),
539503
PHP_MSHUTDOWN(mongodb),
540504
PHP_RINIT(mongodb),

src/BSON/Binary.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @generate-class-entries static
5-
* @generate-function-entries static
6-
*/
4+
* @generate-class-entries static
5+
* @generate-function-entries static
6+
*/
77

88
namespace MongoDB\BSON;
99

src/BSON/BinaryInterface.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @generate-class-entries static
5-
* @generate-function-entries
6-
*/
4+
* @generate-class-entries static
5+
* @generate-function-entries
6+
*/
77

88
namespace MongoDB\BSON;
99

src/BSON/BinaryInterface_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 07bf399f3506a13fc4026d90cb58226598905092 */
2+
* Stub hash: 9177931b152386567f53fed87887207971acceaf */
33

44
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_BSON_BinaryInterface_getData, 0, 0, IS_STRING, 0)
55
ZEND_END_ARG_INFO()

src/BSON/Binary_arginfo.h

Lines changed: 1 addition & 1 deletion
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: bd94329bd8849c9bcb93b41699a19589f1fb905b */
2+
* Stub hash: fac819b0ca7564fd16a3a7f972a5b3cbee650c04 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_BSON_Binary___construct, 0, 0, 2)
55
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)

src/BSON/DBPointer.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @generate-class-entries static
5-
* @generate-function-entries static
6-
*/
4+
* @generate-class-entries static
5+
* @generate-function-entries static
6+
*/
77

88
namespace MongoDB\BSON;
99
final class DBPointer implements \JsonSerializable, Type, \Serializable

src/BSON/DBPointer_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 93eae6546a9e300831dedd1a1912685657e8bc00 */
2+
* Stub hash: 715bc228895c936eb673a93d58750c38fe83f210 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MongoDB_BSON_DBPointer___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()

src/BSON/Decimal128.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @generate-class-entries static
5-
* @generate-function-entries static
6-
*/
4+
* @generate-class-entries static
5+
* @generate-function-entries static
6+
*/
77

88
namespace MongoDB\BSON;
99

src/BSON/Decimal128Interface.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
/**
4-
* @generate-class-entries static
5-
* @generate-function-entries
6-
*/
4+
* @generate-class-entries static
5+
* @generate-function-entries
6+
*/
77

88
namespace MongoDB\BSON;
99

src/BSON/Decimal128Interface_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 8e3bdf5ec19b8267107a1f66c2c31739d935a611 */
2+
* Stub hash: d6d5d5cf0e586b9d76d208ea72b851da3cd37c34 */
33

44
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_MongoDB_BSON_Decimal128Interface___toString, 0, 0, IS_STRING, 0)
55
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)