com php-src: Add arginfo stub for JsonSerializable: ext/json/json.c ext/json/json.stub.php ext/json/json_arginfo.h
| From: | Christoph Michael Becker | Date: | Sat, 05 Oct 2019 09:10:30 +0000 |
| Subject: | com php-src: Add arginfo stub for JsonSerializable: ext/json/json.c ext/json/json.stub.php ext/json/json_arginfo.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108730@lists.php.net to get a copy of this message | ||
Commit: 49b98b4d5cbce437d5bb93ddf71f24c5db2ff419
Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 5 Oct 2019 10:07:43 +0200
Parents: 505050728200e6446cc3ee81d7a2808d3575ea07
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=49b98b4d5cbce437d5bb93ddf71f24c5db2ff419
Log:
Add arginfo stub for JsonSerializable
Changed paths:
M ext/json/json.c
M ext/json/json.stub.php
M ext/json/json_arginfo.h
Diff:
diff --git a/ext/json/json.c b/ext/json/json.c
index 5311d9c1139..5db3621b322 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -52,12 +52,8 @@ static const zend_function_entry json_functions[] = {
/* }}} */
/* {{{ JsonSerializable methods */
-ZEND_BEGIN_ARG_INFO(json_serialize_arginfo, 0)
- /* No arguments */
-ZEND_END_ARG_INFO();
-
static const zend_function_entry json_serializable_interface[] = {
- PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, json_serialize_arginfo)
+ PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize)
PHP_FE_END
};
/* }}} */
diff --git a/ext/json/json.stub.php b/ext/json/json.stub.php
index 323cb6420d0..6b00648461f 100644
--- a/ext/json/json.stub.php
+++ b/ext/json/json.stub.php
@@ -9,3 +9,8 @@ function json_decode(string $json, ?bool $assoc = null, int $depth = 512, int $o
function json_last_error(): int {}
function json_last_error_msg(): string {}
+
+interface JsonSerializable
+{
+ public function jsonSerialize();
+}
diff --git a/ext/json/json_arginfo.h b/ext/json/json_arginfo.h
index 9c6f30686a6..b7177167904 100644
--- a/ext/json/json_arginfo.h
+++ b/ext/json/json_arginfo.h
@@ -18,3 +18,6 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_json_last_error_msg, 0, 0, IS_STRING, 0)
ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_JsonSerializable_jsonSerialize, 0, 0, 0)
+ZEND_END_ARG_INFO()