From: Reedy Date: Thu, 26 Jul 2018 16:31:49 +0000 (+0100) Subject: Update composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0 X-Git-Tag: 1.34.0-rc.0~4654 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=a075271157d32567e894c668aa2b76138c491b95 Update composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0 https://github.com/composer/spdx-licenses/compare/1.3.0...1.4.0 Change-Id: I39f7a1310455159866bfed5224536e800befec0d --- diff --git a/.phpcs.xml b/.phpcs.xml index 8d33f6969d..2a34154689 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -2,6 +2,7 @@ + @@ -12,15 +13,16 @@ + - - + + + - @@ -65,6 +67,13 @@ + + profileinfo\.php + maintenance/language/checkLanguage\.inc + maintenance/doMaintenance\.php + maintenance/mergeMessageFileList\.php + maintenance/commandLine\.inc + */languages/messages/Messages*\.php diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index c91ae7d24f..0497531221 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -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 diff --git a/composer.json b/composer.json index b16983f957..bf9d1eb955 100644 --- a/composer.json +++ b/composer.json @@ -56,12 +56,12 @@ }, "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", diff --git a/includes/EditPage.php b/includes/EditPage.php index a1cf3e2850..16f1c5ae4e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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. diff --git a/includes/Revision.php b/includes/Revision.php index d6ff384fff..7ff73dddbf 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -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. diff --git a/includes/Status.php b/includes/Status.php index 8cd72a59b5..877d2218a2 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -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 diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php index 73463b5662..6f241bab6b 100644 --- a/includes/Storage/DerivedPageDataUpdater.php +++ b/includes/Storage/DerivedPageDataUpdater.php @@ -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. * diff --git a/includes/Storage/RevisionSlots.php b/includes/Storage/RevisionSlots.php index ba9780f66b..91969fc0c7 100644 --- a/includes/Storage/RevisionSlots.php +++ b/includes/Storage/RevisionSlots.php @@ -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 diff --git a/includes/Storage/RevisionStore.php b/includes/Storage/RevisionStore.php index 602364cf5d..d090d8be52 100644 --- a/includes/Storage/RevisionStore.php +++ b/includes/Storage/RevisionStore.php @@ -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. * diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 5c82f09209..39e8bd989e 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -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 ) { diff --git a/includes/libs/http/HttpAcceptParser.php b/includes/libs/http/HttpAcceptParser.php index df22b414f1..93f5b0bce6 100644 --- a/includes/libs/http/HttpAcceptParser.php +++ b/includes/libs/http/HttpAcceptParser.php @@ -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. diff --git a/includes/libs/lockmanager/DBLockManager.php b/includes/libs/lockmanager/DBLockManager.php index aec9f25b9f..5e8c22bc43 100644 --- a/includes/libs/lockmanager/DBLockManager.php +++ b/includes/libs/lockmanager/DBLockManager.php @@ -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 diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index e03645f02b..82ae5aea68 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -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 diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index dc3260d4d4..4070a02b32 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -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 ) { diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php index 1ac7d09bf6..61788e1f48 100644 --- a/includes/libs/rdbms/database/IDatabase.php +++ b/includes/libs/rdbms/database/IDatabase.php @@ -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. * diff --git a/includes/linkeddata/PageDataRequestHandler.php b/includes/linkeddata/PageDataRequestHandler.php index c8d111d0f1..d70688f317 100644 --- a/includes/linkeddata/PageDataRequestHandler.php +++ b/includes/linkeddata/PageDataRequestHandler.php @@ -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 diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index c8e68b2d52..e4b064e0ca 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -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! * diff --git a/includes/site/DBSiteStore.php b/includes/site/DBSiteStore.php index 54d9e9cf1d..b2403ce16b 100644 --- a/includes/site/DBSiteStore.php +++ b/includes/site/DBSiteStore.php @@ -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 diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index c23d99920c..d184e92034 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -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() { diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 68bc61e476..5eb91c37a1 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -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