summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--ext/json/json.c7
-rw-r--r--ext/json/tests/serialize.phpt2
3 files changed, 5 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index a6a7b0e9aa..505a8e27e0 100644
--- a/NEWS
+++ b/NEWS
@@ -30,7 +30,7 @@
- Added command line option --rz to CLI. (Johannes)
- Added closure $this support back. (Stas)
- Added SplObjectStorage::getHash() hook. (Etienne)
-- Added JSON_Serializable interface (Sara)
+- Added JsonSerializable interface (Sara)
- Added support for storing upload progress feedback in session data. (Arnaud)
- default_charset if not specified is now UTF-8 instead of ISO-8859-1. (Rasmus)
diff --git a/ext/json/json.c b/ext/json/json.c
index f40d15d1a1..069ad3d21a 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -76,13 +76,13 @@ static const zend_function_entry json_functions[] = {
};
/* }}} */
-/* {{{ JSON_Serializable methods */
+/* {{{ 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(JSON_Serializable, jsonSerialize, json_serialize_arginfo)
+ PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, json_serialize_arginfo)
{ NULL, NULL, NULL }
};
@@ -91,9 +91,8 @@ static PHP_MINIT_FUNCTION(json)
{
zend_class_entry ce;
- INIT_CLASS_ENTRY(ce, "JSON_Serializable", json_serializable_interface);
+ INIT_CLASS_ENTRY(ce, "JsonSerializable", json_serializable_interface);
php_json_serializable_ce = zend_register_internal_interface(&ce TSRMLS_CC);
- /* Note: Consider adding: interface JSON\Serializable extends JSON_Serializable {} for futureproofing... */
REGISTER_LONG_CONSTANT("JSON_HEX_TAG", PHP_JSON_HEX_TAG, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("JSON_HEX_AMP", PHP_JSON_HEX_AMP, CONST_CS | CONST_PERSISTENT);
diff --git a/ext/json/tests/serialize.phpt b/ext/json/tests/serialize.phpt
index 91bec2ec15..5c513d58ad 100644
--- a/ext/json/tests/serialize.phpt
+++ b/ext/json/tests/serialize.phpt
@@ -15,7 +15,7 @@ class NonSerializingTest
}
}
-class SerializingTest extends NonSerializingTest implements JSON_Serializable
+class SerializingTest extends NonSerializingTest implements JsonSerializable
{
public function jsonSerialize()
{