Docs: Add missing @deprecated tags.

Follow up to [46205-46206,46208].

Props jrf.
See #47699.
Built from https://develop.svn.wordpress.org/trunk@46377


git-svn-id: http://core.svn.wordpress.org/trunk@46176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-10-03 14:48:55 +00:00
parent ecf00fc844
commit 6fa7f757d4
2 changed files with 59 additions and 11 deletions

View File

@ -124,6 +124,8 @@ class Services_JSON
/** /**
* constructs a new JSON instance * constructs a new JSON instance
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param int $use object behavior flags; combine with boolean-OR * @param int $use object behavior flags; combine with boolean-OR
* *
* possible values: * possible values:
@ -154,6 +156,10 @@ class Services_JSON
/** /**
* PHP4 constructor. * PHP4 constructor.
*
* @deprecated 5.3.0 Use __construct() instead.
*
* @see __construct()
*/ */
public function Services_JSON( $use = 0 ) { public function Services_JSON( $use = 0 ) {
_deprecated_constructor( 'Services_JSON', '5.3.0', get_class( $this ) ); _deprecated_constructor( 'Services_JSON', '5.3.0', get_class( $this ) );
@ -171,6 +177,8 @@ class Services_JSON
* provides a slower PHP-only method for installations * provides a slower PHP-only method for installations
* that lack the multibye string extension. * that lack the multibye string extension.
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param string $utf16 UTF-16 character * @param string $utf16 UTF-16 character
* @return string UTF-8 character * @return string UTF-8 character
* @access private * @access private
@ -217,6 +225,8 @@ class Services_JSON
* provides a slower PHP-only method for installations * provides a slower PHP-only method for installations
* that lack the multibyte string extension. * that lack the multibyte string extension.
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param string $utf8 UTF-8 character * @param string $utf8 UTF-8 character
* @return string UTF-16 character * @return string UTF-16 character
* @access private * @access private
@ -259,6 +269,8 @@ class Services_JSON
/** /**
* encodes an arbitrary variable into JSON format (and sends JSON Header) * encodes an arbitrary variable into JSON format (and sends JSON Header)
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param mixed $var any number, boolean, string, array, or object to be encoded. * @param mixed $var any number, boolean, string, array, or object to be encoded.
* see argument 1 to Services_JSON() above for array-parsing behavior. * see argument 1 to Services_JSON() above for array-parsing behavior.
* if var is a string, note that encode() always expects it * if var is a string, note that encode() always expects it
@ -277,6 +289,8 @@ class Services_JSON
/** /**
* encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!) * encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!)
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param mixed $var any number, boolean, string, array, or object to be encoded. * @param mixed $var any number, boolean, string, array, or object to be encoded.
* see argument 1 to Services_JSON() above for array-parsing behavior. * see argument 1 to Services_JSON() above for array-parsing behavior.
* if var is a string, note that encode() always expects it * if var is a string, note that encode() always expects it
@ -300,6 +314,8 @@ class Services_JSON
/** /**
* PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format * PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param mixed $var any number, boolean, string, array, or object to be encoded. * @param mixed $var any number, boolean, string, array, or object to be encoded.
* see argument 1 to Services_JSON() above for array-parsing behavior. * see argument 1 to Services_JSON() above for array-parsing behavior.
* if var is a string, note that encode() always expects it * if var is a string, note that encode() always expects it
@ -545,6 +561,8 @@ class Services_JSON
/** /**
* array-walking function for use in generating JSON-formatted name-value pairs * array-walking function for use in generating JSON-formatted name-value pairs
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param string $name name of key to use * @param string $name name of key to use
* @param mixed $value reference to an array element to be encoded * @param mixed $value reference to an array element to be encoded
* *
@ -567,6 +585,8 @@ class Services_JSON
/** /**
* reduce a string by removing leading and trailing comments and whitespace * reduce a string by removing leading and trailing comments and whitespace
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param $str string string value to strip of comments and whitespace * @param $str string string value to strip of comments and whitespace
* *
* @return string string value stripped of comments and whitespace * @return string string value stripped of comments and whitespace
@ -596,6 +616,8 @@ class Services_JSON
/** /**
* decodes a JSON string into appropriate variable * decodes a JSON string into appropriate variable
* *
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @param string $str JSON-formatted string * @param string $str JSON-formatted string
* *
* @return mixed number, boolean, string, array, or object * @return mixed number, boolean, string, array, or object
@ -886,6 +908,8 @@ class Services_JSON
} }
/** /**
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*
* @todo Ultimately, this should just call PEAR::isError() * @todo Ultimately, this should just call PEAR::isError()
*/ */
function isError($data, $code = null) function isError($data, $code = null)
@ -903,10 +927,13 @@ class Services_JSON
} }
/** /**
* Calculates length of string in bytes * Calculates length of string in bytes
* @param string *
* @return integer length * @deprecated 5.3.0 Use the PHP native JSON extension instead.
*/ *
* @param string
* @return integer length
*/
function strlen8( $str ) function strlen8( $str )
{ {
_deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' ); _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );
@ -918,12 +945,15 @@ class Services_JSON
} }
/** /**
* Returns part of a string, interpreting $start and $length as number of bytes. * Returns part of a string, interpreting $start and $length as number of bytes.
* @param string *
* @param integer start * @deprecated 5.3.0 Use the PHP native JSON extension instead.
* @param integer length *
* @return integer length * @param string
*/ * @param integer start
* @param integer length
* @return integer length
*/
function substr8( $string, $start, $length=false ) function substr8( $string, $start, $length=false )
{ {
_deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' ); _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );
@ -943,6 +973,11 @@ if (class_exists('PEAR_Error')) {
class Services_JSON_Error extends PEAR_Error class Services_JSON_Error extends PEAR_Error
{ {
/**
* PHP5 constructor.
*
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*/
function __construct($message = 'unknown error', $code = null, function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null) $mode = null, $options = null, $userinfo = null)
{ {
@ -951,6 +986,13 @@ if (class_exists('PEAR_Error')) {
parent::PEAR_Error($message, $code, $mode, $options, $userinfo); parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
} }
/**
* PHP4 constructor.
*
* @deprecated 5.3.0 Use __construct() instead.
*
* @see __construct()
*/
public function Services_JSON_Error($message = 'unknown error', $code = null, public function Services_JSON_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null) { $mode = null, $options = null, $userinfo = null) {
_deprecated_constructor( 'Services_JSON_Error', '5.3.0', get_class( $this ) ); _deprecated_constructor( 'Services_JSON_Error', '5.3.0', get_class( $this ) );
@ -967,6 +1009,8 @@ if (class_exists('PEAR_Error')) {
{ {
/** /**
* PHP5 constructor. * PHP5 constructor.
*
* @deprecated 5.3.0 Use the PHP native JSON extension instead.
*/ */
function __construct( $message = 'unknown error', $code = null, function __construct( $message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null ) $mode = null, $options = null, $userinfo = null )
@ -976,6 +1020,10 @@ if (class_exists('PEAR_Error')) {
/** /**
* PHP4 constructor. * PHP4 constructor.
*
* @deprecated 5.3.0 Use __construct() instead.
*
* @see __construct()
*/ */
public function Services_JSON_Error( $message = 'unknown error', $code = null, public function Services_JSON_Error( $message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null ) { $mode = null, $options = null, $userinfo = null ) {

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-beta2-46376'; $wp_version = '5.3-beta2-46377';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.