Change @since and @deprecated notes to 1.22
authorKevin Israel <pleasestand@live.com>
Mon, 20 May 2013 05:52:14 +0000 (01:52 -0400)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 21 Jun 2013 05:33:22 +0000 (05:33 +0000)
Using the following command line, I have found doc comments mentioning
"1.21" when they should mention "1.22" instead, which I have fixed
manually:

git diff REL1_21 | grep --color=always -C 10 -iE \
'^\+.*(since|deprecated).*1\.21(\D|$)' | aha > oldver.html

I also moved the release notes for I1987190f ("Combine JavaScript and
JSON encoding logic") from RELEASE-NOTES-1.21 to RELEASE-NOTES-1.22
because I had reverted the commit on REL1_21 only (see Id3b88102 and
bug 47431 for the rationale).

Change-Id: I11b917a371e07267dfa98b8449776d0c1cb29b15
Follows-Up: I25cf5a94f6e47f85a9d0b80cc1c9c9f957288478
Follows-Up: I3d72e4105f6244b0695116940e62a2ddef66eb66
Follows-Up: I3faa9c3e8107c6e46cdf21f8c18adda1f42890d7
Follows-Up: I6aab19c8d68bf47beddad42632b0360a7b12f251
Follows-Up: I86368821fc2cd0729df5342b8572eb470c0f77a0
Follows-Up: Id3b88102e768318e3605a19e9952121091a40915
Follows-Up: Ie667088010e24eb6cb569f9e8e8e2553005223eb

14 files changed:
RELEASE-NOTES-1.22
includes/Block.php
includes/cache/LocalisationCache.php
includes/db/IORMRow.php
includes/db/ORMRow.php
includes/db/ORMTable.php
includes/json/FormatJson.php
includes/logging/DeleteLogFormatter.php
includes/logging/MoveLogFormatter.php
includes/logging/NewUsersLogFormatter.php
includes/logging/PatrolLogFormatter.php
includes/logging/RightsLogFormatter.php
languages/Language.php
languages/LanguageConverter.php

index 41eaa98..33c6351 100644 (file)
@@ -153,6 +153,10 @@ production.
 * Special:Recentchangeslinked will now include upload log entries
 
 === API changes in 1.22 ===
+* (bug 25553) The JSON output formatter now leaves forward slashes unescaped
+  to improve human readability of URLs and similar strings. Also, a "utf8"
+  option is now provided to use UTF-8 encoding instead of hex escape codes
+  for most non-ASCII characters.
 * (bug 46626) xmldoublequote parameter was removed. Because of a bug, the
   parameter has had no effect since MediaWiki 1.16, and so its removal is
   unlikely to impact existing clients.
@@ -197,6 +201,17 @@ changes to languages because of Bugzilla reports.
 * (bug 46751) Made Buryat (Russia) (буряад) (bxr) fallback to Russian.
 
 === Other changes in 1.22 ===
+* BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding
+  has changed:
+** MediaWiki no longer supports PHP installations in which the native JSON
+   extension is missing or disabled.
+** XmlJsCode objects can no longer be nested inside objects or arrays.
+   (For Xml::encodeJsCall(), this individually applies to each argument.)
+** The sets of characters escaped by default, along with the precise escape
+   sequences used, have changed (except for the Xml::escapeJsString()
+   function, which is now deprecated).
+* BREAKING CHANGE: The Services_JSON class has been removed. If necessary,
+  be sure to upgrade affected extensions at the same time (e.g. Collection).
 * redirect.php was removed. It was unused.
 * ClickTracking integration was dropped from the mediaWiki.user.bucket
   JavaScript function. The 'tracked' option is now ignored.
index d2f430e..f4c5b79 100644 (file)
@@ -1092,7 +1092,7 @@ class Block {
         * @param Bool $isAnon Exclude anonymous-only blocks if false
         * @param Bool $fromMaster Whether to query the master or slave database
         * @return Array of Blocks
-        * @since 1.21
+        * @since 1.22
         */
        public static function getBlocksForIPList( array $ipChain, $isAnon, $fromMaster = false ) {
                if ( !count( $ipChain ) ) {
index 0f229f9..bdc2d78 100644 (file)
@@ -551,7 +551,7 @@ class LocalisationCache {
        /**
         * Get the plural rule types for a given language from the XML files.
         * Cached.
-        * @since 1.21
+        * @since 1.22
         */
        public function getPluralRuleTypes( $code ) {
                if ( $this->pluralRuleTypes === null ) {
index f8833f5..3941179 100644 (file)
@@ -37,7 +37,7 @@ interface IORMRow {
         * Load the specified fields from the database.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param array|null $fields
         * @param boolean $override
@@ -64,9 +64,9 @@ interface IORMRow {
         * Gets the value of a field but first loads it if not done so already.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
-        * @param string$name
+        * @param string $name
         *
         * @return mixed
         */
@@ -146,7 +146,7 @@ interface IORMRow {
         * Load the default values, via getDefaults.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param boolean $override
         */
@@ -159,7 +159,7 @@ interface IORMRow {
         * @since 1.20
         *
         * @param string|null $functionName
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @return boolean Success indicator
         */
@@ -169,7 +169,7 @@ interface IORMRow {
         * Removes the object from the database.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @return boolean Success indicator
         */
@@ -211,7 +211,7 @@ interface IORMRow {
         * Add an amount (can be negative) to the specified field (needs to be numeric).
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param string $field
         * @param integer $amount
@@ -233,7 +233,7 @@ interface IORMRow {
         * Computes and updates the values of the summary fields.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param array|string|null $summaryFields
         */
@@ -243,7 +243,7 @@ interface IORMRow {
         * Sets the value for the @see $updateSummaries field.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param boolean $update
         */
@@ -253,7 +253,7 @@ interface IORMRow {
         * Sets the value for the @see $inSummaryMode field.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param boolean $summaryMode
         */
@@ -263,7 +263,7 @@ interface IORMRow {
         * Returns the table this IORMRow is a row in.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @return IORMTable
         */
index b21ce40..5ce3794 100644 (file)
@@ -48,7 +48,7 @@ class ORMRow implements IORMRow {
         * Settings this to false can prevent needless updating work in situations
         * such as deleting a university, which will then delete all it's courses.
         *
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         * @since 1.20
         * @var bool
         */
@@ -59,14 +59,14 @@ class ORMRow implements IORMRow {
         * This mode indicates that only summary fields got updated,
         * which allows for optimizations.
         *
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         * @since 1.20
         * @var bool
         */
        protected $inSummaryMode = false;
 
        /**
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         * @since 1.20
         * @var ORMTable|null
         */
@@ -77,9 +77,9 @@ class ORMRow implements IORMRow {
         *
         * @since 1.20
         *
-        * @param IORMTable|null $table Deprecated since 1.21
+        * @param IORMTable|null $table Deprecated since 1.22
         * @param array|null $fields
-        * @param boolean $loadDefaults Deprecated since 1.21
+        * @param boolean $loadDefaults Deprecated since 1.22
         */
        public function __construct( IORMTable $table = null, $fields = null, $loadDefaults = false ) {
                $this->table = $table;
@@ -99,7 +99,7 @@ class ORMRow implements IORMRow {
         * Load the specified fields from the database.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param array|null $fields
         * @param boolean $override
@@ -164,7 +164,7 @@ class ORMRow implements IORMRow {
         * Gets the value of a field but first loads it if not done so already.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param $name string
         *
@@ -240,7 +240,7 @@ class ORMRow implements IORMRow {
         * Gets the fields => values to write to the table.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @return array
         */
@@ -326,7 +326,7 @@ class ORMRow implements IORMRow {
         * Load the default values, via getDefaults.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param boolean $override
         */
@@ -339,7 +339,7 @@ class ORMRow implements IORMRow {
         * when it already exists, or inserting it when it doesn't.
         *
         * @since 1.20
-        * @deprecated since 1.21 Use IORMTable->updateRow or ->insertRow
+        * @deprecated since 1.22 Use IORMTable->updateRow or ->insertRow
         *
         * @param string|null $functionName
         *
@@ -357,7 +357,7 @@ class ORMRow implements IORMRow {
         * Updates the object in the database.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param string|null $functionName
         *
@@ -395,7 +395,7 @@ class ORMRow implements IORMRow {
         * Inserts the object into the database.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param string|null $functionName
         * @param array|null $options
@@ -428,7 +428,7 @@ class ORMRow implements IORMRow {
         * Removes the object from the database.
         *
         * @since 1.20
-        * @deprecated since 1.21, use IROMtable->removeRow
+        * @deprecated since 1.22, use IORMTable->removeRow
         *
         * @return boolean Success indicator
         */
@@ -448,7 +448,7 @@ class ORMRow implements IORMRow {
         * Gets called before an object is removed from the database.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         */
        protected function beforeRemove() {
                $this->loadFields( $this->getBeforeRemoveFields(), false, true );
@@ -472,7 +472,7 @@ class ORMRow implements IORMRow {
         * Can be overridden to get rid of linked data.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         */
        protected function onRemoved() {
                $this->setField( 'id', null );
@@ -520,7 +520,7 @@ class ORMRow implements IORMRow {
         * Add an amount (can be negative) to the specified field (needs to be numeric).
         *
         * @since 1.20
-        * @deprecated since 1.21, use IORMTable->addToField
+        * @deprecated since 1.22, use IORMTable->addToField
         *
         * @param string $field
         * @param integer $amount
@@ -535,7 +535,7 @@ class ORMRow implements IORMRow {
         * Return the names of the fields.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @return array
         */
@@ -547,7 +547,7 @@ class ORMRow implements IORMRow {
         * Computes and updates the values of the summary fields.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param array|string|null $summaryFields
         */
@@ -559,7 +559,7 @@ class ORMRow implements IORMRow {
         * Sets the value for the @see $updateSummaries field.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param boolean $update
         */
@@ -571,7 +571,7 @@ class ORMRow implements IORMRow {
         * Sets the value for the @see $inSummaryMode field.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @param boolean $summaryMode
         */
@@ -583,7 +583,7 @@ class ORMRow implements IORMRow {
         * Returns the table this IORMRow is a row in.
         *
         * @since 1.20
-        * @deprecated since 1.21
+        * @deprecated since 1.22
         *
         * @return IORMTable
         */
index 3a432cd..5f6723b 100644 (file)
@@ -952,9 +952,9 @@ class ORMTable extends DBAccessBase implements IORMTable {
        }
 
        /**
-        * Updated the provided row in the database.
+        * Updates the provided row in the database.
         *
-        * @since 1.21
+        * @since 1.22
         *
         * @param IORMRow $row The row to save
         * @param string|null $functionName
@@ -980,7 +980,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
        /**
         * Inserts the provided row into the database.
         *
-        * @since 1.21
+        * @since 1.22
         *
         * @param IORMRow $row
         * @param string|null $functionName
@@ -1013,7 +1013,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
        /**
         * Gets the fields => values to write to the table.
         *
-        * @since 1.20
+        * @since 1.22
         *
         * @param IORMRow $row
         *
@@ -1047,7 +1047,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
        /**
         * Removes the provided row from the database.
         *
-        * @since 1.21
+        * @since 1.22
         *
         * @param IORMRow $row
         * @param string|null $functionName
@@ -1067,7 +1067,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
        /**
         * Add an amount (can be negative) to the specified field (needs to be numeric).
         *
-        * @since 1.21
+        * @since 1.22
         *
         * @param array $conditions
         * @param string $field
index f17a1a1..91e1e87 100644 (file)
@@ -30,7 +30,7 @@ class FormatJson {
         * This encoding option saves 3 to 8 bytes (uncompressed) for each such character;
         * however, it could break compatibility with systems that incorrectly handle UTF-8.
         *
-        * @since 1.21
+        * @since 1.22
         */
        const UTF8_OK = 1;
 
@@ -42,7 +42,7 @@ class FormatJson {
         * - HTML5, §4.3.1.2 Restrictions for contents of script elements
         * - XML 1.0 (5th Ed.), §2.4 Character Data and Markup
         *
-        * @since 1.21
+        * @since 1.22
         */
        const XMLMETA_OK = 2;
 
@@ -51,7 +51,7 @@ class FormatJson {
         *
         * @warning When generating inline script blocks, use FormatJson::UTF8_OK instead.
         *
-        * @since 1.21
+        * @since 1.22
         */
        const ALL_OK = 3;
 
@@ -80,7 +80,7 @@ class FormatJson {
         * @note Empty arrays are encoded as numeric arrays, not as objects, so cast any associative
         *       array that might be empty to an object before encoding it.
         *
-        * @note In pre-1.21 versions of MediaWiki, using this function for generating inline script
+        * @note In pre-1.22 versions of MediaWiki, using this function for generating inline script
         *       blocks may result in an XSS vulnerability, and quite likely will in XML documents
         *       (cf. FormatJson::XMLMETA_OK). Use Xml::encodeJsVar() instead in such cases.
         *
index ef9a2d4..44334ba 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  * @author Niklas Laxström
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
  */
 
 /**
index 589b1ba..0978f97 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  * @author Niklas Laxström
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
  */
 
 /**
index ed37b6a..602728b 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  * @author Niklas Laxström
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
  */
 
 /**
index 74ab196..507039b 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  * @author Niklas Laxström
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
  */
 
 /**
index 67bd4d0..d3daf6e 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  * @author Alexandre Emsenhuber
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
- * @since 1.21
+ * @since 1.22
  */
 
 /**
index 00f654b..50cb7f7 100644 (file)
@@ -2251,7 +2251,7 @@ class Language {
         * @param MWTimestamp $relativeTo Base timestamp
         * @param User $user User preferences to use
         * @return string Human timestamp
-        * @since 1.21
+        * @since 1.22
         */
        public function getHumanTimestamp( MWTimestamp $ts, MWTimestamp $relativeTo, User $user ) {
                $diff = $ts->diff( $relativeTo );
@@ -4504,7 +4504,7 @@ class Language {
 
        /**
         * Get the plural rule types for the language
-        * @since 1.21
+        * @since 1.22
         * @return array Associative array with plural form number and plural rule type as key-value pairs
         */
        public function getPluralRuleTypes() {
@@ -4535,7 +4535,7 @@ class Language {
         * Find the plural rule type appropriate for the given number
         * For example, if the language is set to Arabic, getPluralType(5) should
         * return 'few'.
-        * @since 1.21
+        * @since 1.22
         * @return string The name of the plural rule type, e.g. one, two, few, many
         */
        public function getPluralRuleType( $number ) {
index e13cb59..a02fc8a 100644 (file)
@@ -1363,7 +1363,7 @@ class ConverterRule {
         * and may return false in this case (so this title conversion rule
         * will be ignored and the original title is shown).
         *
-        * @since 1.21
+        * @since 1.22
         * @param $variant The variant code to display page title in
         * @return String|false The converted title or false if just page name
         */