Skip to content

Commit 49b98b4

Browse files
committed
Add arginfo stub for JsonSerializable
1 parent 5050507 commit 49b98b4

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

ext/json/json.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@ static const zend_function_entry json_functions[] = {
5252
/* }}} */
5353

5454
/* {{{ JsonSerializable methods */
55-
ZEND_BEGIN_ARG_INFO(json_serialize_arginfo, 0)
56-
/* No arguments */
57-
ZEND_END_ARG_INFO();
58-
5955
static const zend_function_entry json_serializable_interface[] = {
60-
PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, json_serialize_arginfo)
56+
PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize)
6157
PHP_FE_END
6258
};
6359
/* }}} */

ext/json/json.stub.php

+5
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ function json_decode(string $json, ?bool $assoc = null, int $depth = 512, int $o
99
function json_last_error(): int {}
1010

1111
function json_last_error_msg(): string {}
12+
13+
interface JsonSerializable
14+
{
15+
public function jsonSerialize();
16+
}

ext/json/json_arginfo.h

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ ZEND_END_ARG_INFO()
1818

1919
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_json_last_error_msg, 0, 0, IS_STRING, 0)
2020
ZEND_END_ARG_INFO()
21+
22+
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_JsonSerializable_jsonSerialize, 0, 0, 0)
23+
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)