Update composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0
authorReedy <reedy@wikimedia.org>
Thu, 26 Jul 2018 16:31:49 +0000 (17:31 +0100)
committerReedy <reedy@wikimedia.org>
Thu, 26 Jul 2018 17:44:28 +0000 (17:44 +0000)
https://github.com/composer/spdx-licenses/compare/1.3.0...1.4.0

Change-Id: I39f7a1310455159866bfed5224536e800befec0d

20 files changed:
.phpcs.xml
RELEASE-NOTES-1.32
composer.json
includes/EditPage.php
includes/Revision.php
includes/Status.php
includes/Storage/DerivedPageDataUpdater.php
includes/Storage/RevisionSlots.php
includes/Storage/RevisionStore.php
includes/deferred/LinksUpdate.php
includes/libs/http/HttpAcceptParser.php
includes/libs/lockmanager/DBLockManager.php
includes/libs/objectcache/BagOStuff.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/IDatabase.php
includes/linkeddata/PageDataRequestHandler.php
includes/parser/ParserOptions.php
includes/site/DBSiteStore.php
includes/utils/UIDGenerator.php
tests/parser/ParserTestRunner.php

index 8d33f69..2a34154 100644 (file)
@@ -2,6 +2,7 @@
 <ruleset name="MediaWiki">
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude name="Generic.ControlStructures.InlineControlStructure" />
+               <exclude name="MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd" />
                <exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
+               <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
                <exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
-               <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
-               <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment" />
                <exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
                <exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" />
+               <exclude name="MediaWiki.Usage.ForbiddenFunctions.passthru" />
                <exclude name="MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle" />
+               <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+               <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment" />
                <exclude name="Squiz.Scope.MethodScope.Missing" />
                <exclude name="Squiz.Scope.MemberVarScope.Missing" />
-               <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
        </rule>
        <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
                <properties>
                        <property name="ignoreList" type="array" value="$IP,$messageMemc" />
                </properties>
        </rule>
+       <rule ref="MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix">
+               <exclude-pattern>profileinfo\.php</exclude-pattern>
+               <exclude-pattern>maintenance/language/checkLanguage\.inc</exclude-pattern>
+               <exclude-pattern>maintenance/doMaintenance\.php</exclude-pattern>
+               <exclude-pattern>maintenance/mergeMessageFileList\.php</exclude-pattern>
+               <exclude-pattern>maintenance/commandLine\.inc</exclude-pattern>
+       </rule>
        <rule ref="Generic.Files.LineLength">
                <exclude-pattern>*/languages/messages/Messages*\.php</exclude-pattern>
        </rule>
index c91ae7d..0497531 100644 (file)
@@ -65,6 +65,8 @@ production.
 * Updated wikimedia/scoped-callback from 1.0.0 to 2.0.0.
 ** ScopedCallback objects can no longer be serialized.
 * Updated wikimedia/wrappedstring from 2.3.0 to 3.0.1.
+* Updated mediawiki/mediawiki-codesniffer from v20.0.0 to v21.0.0.
+* Updated composer/spdx-licenses from 1.3.0 to 1.4.0.
 
 ==== New external libraries ====
 * Added wikimedia/xmp-reader 0.5.1
index b16983f..bf9d1eb 100644 (file)
        },
        "require-dev": {
                "cache/integration-tests": "0.16.0",
-               "composer/spdx-licenses": "1.3.0",
+               "composer/spdx-licenses": "1.4.0",
                "hamcrest/hamcrest-php": "^2.0",
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
                "justinrainbow/json-schema": "~5.2",
-               "mediawiki/mediawiki-codesniffer": "20.0.0",
+               "mediawiki/mediawiki-codesniffer": "21.0.0",
                "monolog/monolog": "~1.22.1",
                "nikic/php-parser": "3.1.3",
                "seld/jsonlint": "1.7.1",
index a1cf3e2..16f1c5a 100644 (file)
@@ -2361,7 +2361,7 @@ ERROR;
         * Returns the revision that was current at the time editing was initiated on the client,
         * even if the edit was based on an old revision.
         *
-        * @warning: this method is very poorly named. If the user opened the form with ?oldid=X,
+        * @warning this method is very poorly named. If the user opened the form with ?oldid=X,
         *        one might think of X as the "base revision", which is NOT what this returns,
         *        see oldid for that. One might further assume that this corresponds to the $baseRevId
         *        parameter of WikiPage::doEditContent, which is not the case either.
index d6ff384..7ff73dd 100644 (file)
@@ -739,7 +739,7 @@ class Revision implements IDBAccessObject {
        /**
         * Set the title of the revision
         *
-        * @deprecated: since 1.31, this is now a noop. Pass the Title to the constructor instead.
+        * @deprecated since 1.31, this is now a noop. Pass the Title to the constructor instead.
         *
         * @param Title $title
         */
@@ -927,7 +927,7 @@ class Revision implements IDBAccessObject {
         * used to determine the content model to use. If no title is know, CONTENT_MODEL_WIKITEXT
         * is used as a last resort.
         *
-        * @todo: drop this, with MCR, there no longer is a single model associated with a revision.
+        * @todo drop this, with MCR, there no longer is a single model associated with a revision.
         *
         * @return string The content model id associated with this revision,
         *     see the CONTENT_MODEL_XXX constants.
@@ -942,7 +942,7 @@ class Revision implements IDBAccessObject {
         * If no content format was stored in the database, the default format for this
         * revision's content model is returned.
         *
-        * @todo: drop this, the format is irrelevant to the revision!
+        * @todo drop this, the format is irrelevant to the revision!
         *
         * @return string The content format id associated with this revision,
         *     see the CONTENT_FORMAT_XXX constants.
index 8cd72a5..877d221 100644 (file)
@@ -359,7 +359,7 @@ class Status extends StatusValue {
        /**
         * Returns a list of status messages of the given type (or all if false)
         *
-        * @note: this handles RawMessage poorly
+        * @note this handles RawMessage poorly
         *
         * @param string|bool $type
         * @return array
index 73463b5..6f241ba 100644 (file)
@@ -679,11 +679,11 @@ class DerivedPageDataUpdater implements IDBAccessObject {
         *
         * @see docs/pageupdater.txt for more information on when thie method can and should be called.
         *
-        * @note: Calling this method more than once with the same $slotsUpdate
+        * @note Calling this method more than once with the same $slotsUpdate
         * has no effect. Calling this method multiple times with different content will cause
         * an exception.
         *
-        * @note: Calling this method after prepareUpdate() has been called will cause an exception.
+        * @note Calling this method after prepareUpdate() has been called will cause an exception.
         *
         * @param User $user The user to act as context for pre-save transformation (PST).
         *        Type hint should be reduced to UserIdentity at some point.
@@ -826,7 +826,7 @@ class DerivedPageDataUpdater implements IDBAccessObject {
        /**
         * Whether the edit created, or should create, a new revision (that is, it's not a null-edit).
         *
-        * @warning: at present, "null-revisions" that do not change content but do have a revision
+        * @warning at present, "null-revisions" that do not change content but do have a revision
         * record would return false after prepareContent(), but true after prepareUpdate()!
         * This should probably be fixed.
         *
@@ -931,11 +931,11 @@ class DerivedPageDataUpdater implements IDBAccessObject {
         *
         * @see docs/pageupdater.txt for more information on when thie method can and should be called.
         *
-        * @note: Calling this method more than once with the same revision has no effect.
+        * @note Calling this method more than once with the same revision has no effect.
         * $options are only used for the first call. Calling this method multiple times with
         * different revisions will cause an exception.
         *
-        * @note: If grabCurrentRevision() (or prepareContent()) has been called before
+        * @note If grabCurrentRevision() (or prepareContent()) has been called before
         * calling this method, $revision->getParentRevision() has to refer to the revision that
         * was the current revision at the time grabCurrentRevision() was called.
         *
index ba9780f..91969fc 100644 (file)
@@ -139,7 +139,7 @@ class RevisionSlots {
        /**
         * Computes the total nominal size of the revision's slots, in bogo-bytes.
         *
-        * @warn This is potentially expensive! It may cause all slot's content to be loaded
+        * @warning This is potentially expensive! It may cause all slot's content to be loaded
         * and deserialized.
         *
         * @return int
@@ -181,7 +181,7 @@ class RevisionSlots {
         * is that slot's hash. For consistency, the combined hash of an empty set of slots
         * is the hash of the empty string.
         *
-        * @warn This is potentially expensive! It may cause all slot's content to be loaded
+        * @warning This is potentially expensive! It may cause all slot's content to be loaded
         * and deserialized, then re-serialized and hashed.
         *
         * @return string
index 602364c..d090d8b 100644 (file)
@@ -917,7 +917,7 @@ class RevisionStore
         * Such revisions can for instance identify page rename
         * operations and other such meta-modifications.
         *
-        * @note: This method grabs a FOR UPDATE lock on the relevant row of the page table,
+        * @note This method grabs a FOR UPDATE lock on the relevant row of the page table,
         * to prevent a new revision from being inserted before the null revision has been written
         * to the database.
         *
index 5c82f09..39e8bd9 100644 (file)
@@ -161,7 +161,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
        /**
         * Update link tables with outgoing links from an updated article
         *
-        * @note: this is managed by DeferredUpdates::execute(). Do not run this in a transaction.
+        * @note this is managed by DeferredUpdates::execute(). Do not run this in a transaction.
         */
        public function doUpdate() {
                if ( $this->ticket ) {
index df22b41..93f5b0b 100644 (file)
@@ -23,7 +23,7 @@ class HttpAcceptParser {
         * Note that type parameters and accept extension like the "level" parameter
         * are not supported, weights are derived from "q" values only.
         *
-        * @todo: If additional type parameters are present, ignore them cleanly.
+        * @todo If additional type parameters are present, ignore them cleanly.
         *        At present, they often confuse the result.
         *
         * See HTTP/1.1 section 14 for details.
index aec9f25..5e8c22b 100644 (file)
@@ -94,7 +94,7 @@ abstract class DBLockManager extends QuorumLockManager {
        }
 
        /**
-        * @TODO change this code to work in one batch
+        * @todo change this code to work in one batch
         * @param string $lockSrv
         * @param array $pathsByType
         * @return StatusValue
index e03645f..82ae5ae 100644 (file)
@@ -238,7 +238,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface {
        abstract protected function doGet( $key, $flags = 0 );
 
        /**
-        * @note: This method is only needed if merge() uses mergeViaCas()
+        * @note This method is only needed if merge() uses mergeViaCas()
         *
         * @param string $key
         * @param mixed &$casToken
index dc3260d..4070a02 100644 (file)
@@ -287,7 +287,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        const STATUS_TRX_NONE = 3;
 
        /**
-        * @note: exceptions for missing libraries/drivers should be thrown in initConnection()
+        * @note exceptions for missing libraries/drivers should be thrown in initConnection()
         * @param array $params Parameters passed from Database::factory()
         */
        protected function __construct( array $params ) {
index 1ac7d09..61788e1 100644 (file)
@@ -32,7 +32,7 @@ use stdClass;
 /**
  * Basic database interface for live and lazy-loaded relation database handles
  *
- * @note: IDatabase and DBConnRef should be updated to reflect any changes
+ * @note IDatabase and DBConnRef should be updated to reflect any changes
  * @ingroup Database
  */
 interface IDatabase {
@@ -1500,7 +1500,7 @@ interface IDatabase {
         *
         * This is useful for combining cooperative locks and DB transactions.
         *
-        * @note: do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
+        * @note do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
         *
         * The callback takes the following arguments:
         *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK)
@@ -1535,7 +1535,7 @@ interface IDatabase {
         *
         * Updates will execute in the order they were enqueued.
         *
-        * @note: do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
+        * @note do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
         *
         * The callback takes the following arguments:
         *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_IDLE)
@@ -1623,7 +1623,7 @@ interface IDatabase {
         *   - The failures are from contention solvable via onTransactionPreCommitOrIdle()
         *   - The failures are deadlocks; the RDBMs usually discard the whole transaction
         *
-        * @note: callers must use additional measures for situations involving two or more
+        * @note callers must use additional measures for situations involving two or more
         *   (peer) transactions (e.g. updating two database servers at once). The transaction
         *   and savepoint logic of this method only applies to this specific IDatabase instance.
         *
@@ -1702,7 +1702,7 @@ interface IDatabase {
         * corresponding startAtomic() implicitly started a transaction, that
         * transaction is rolled back.
         *
-        * @note: callers must use additional measures for situations involving two or more
+        * @note callers must use additional measures for situations involving two or more
         *   (peer) transactions (e.g. updating two database servers at once). The transaction
         *   and savepoint logic of startAtomic() are bound to specific IDatabase instances.
         *
index c8d111d..d70688f 100644 (file)
@@ -72,7 +72,7 @@ class PageDataRequestHandler {
         *        - oldid|revision: the revision ID
         * @param OutputPage $output
         *
-        * @note: Instead of an output page, a WebResponse could be sufficient, but
+        * @note Instead of an output page, a WebResponse could be sufficient, but
         *        redirect logic is currently implemented in OutputPage.
         *
         * @throws HttpError
index c8e68b2..e4b064e 100644 (file)
@@ -666,7 +666,7 @@ class ParserOptions {
        /**
         * Get the user language used by the parser for this page and split the parser cache.
         *
-        * @warning: Calling this causes the parser cache to be fragmented by user language!
+        * @warning Calling this causes the parser cache to be fragmented by user language!
         * To avoid cache fragmentation, output should not depend on the user language.
         * Use Parser::getFunctionLang() or Parser::getTargetLanguage() instead!
         *
@@ -687,7 +687,7 @@ class ParserOptions {
        /**
         * Same as getUserLangObj() but returns a string instead.
         *
-        * @warning: Calling this causes the parser cache to be fragmented by user language!
+        * @warning Calling this causes the parser cache to be fragmented by user language!
         * To avoid cache fragmentation, output should not depend on the user language.
         * Use Parser::getFunctionLang() or Parser::getTargetLanguage() instead!
         *
index 54d9e9c..b2403ce 100644 (file)
@@ -45,7 +45,7 @@ class DBSiteStore implements SiteStore {
        /**
         * @since 1.27
         *
-        * @todo: inject some kind of connection manager that is aware of the target wiki,
+        * @todo inject some kind of connection manager that is aware of the target wiki,
         * instead of injecting a LoadBalancer.
         *
         * @param LoadBalancer $dbLoadBalancer
index c23d999..d184e92 100644 (file)
@@ -84,7 +84,7 @@ class UIDGenerator {
        }
 
        /**
-        * @todo: move to MW-specific factory class and inject temp dir
+        * @todo move to MW-specific factory class and inject temp dir
         * @return UIDGenerator
         */
        protected static function singleton() {
index 68bc61e..5eb91c3 100644 (file)
@@ -1250,7 +1250,7 @@ class ParserTestRunner {
         * For best performance, call this once only for all tests. However, it can
         * be called at the start of each test if more isolation is desired.
         *
-        * @todo: This is basically an unrefactored copy of
+        * @todo This is basically an unrefactored copy of
         * MediaWikiTestCase::setupAllTestDBs. They should be factored out somehow.
         *
         * Do not call this function from a MediaWikiTestCase subclass, since