X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCommentStore.php;h=4a673c442ed4f3ca2f472371884f1e25346f9727;hb=e73328601d51674e8fef89c3db12b30ceafd702f;hp=cba7a150d3a49360eff355d3b4f0401fb86b3130;hpb=1d47891cc3d43bc6b47e30d0b605436c3dac1fc9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CommentStore.php b/includes/CommentStore.php index cba7a150d3..4a673c442e 100644 --- a/includes/CommentStore.php +++ b/includes/CommentStore.php @@ -82,7 +82,11 @@ class CommentStore { */ protected $key = null; - /** @var int One of the MIGRATION_* constants */ + /** + * @var int One of the MIGRATION_* constants + * @todo Deprecate and remove once extensions seem unlikely to need to use + * it for migration anymore. + */ protected $stage; /** @var array[] Cache for `self::getJoin()` */ @@ -94,7 +98,8 @@ class CommentStore { /** * @param Language $lang Language to use for comment truncation. Defaults * to content language. - * @param int $migrationStage One of the MIGRATION_* constants + * @param int $migrationStage One of the MIGRATION_* constants. Always + * MIGRATION_NEW for MediaWiki core since 1.33. */ public function __construct( Language $lang, $migrationStage ) { $this->stage = $migrationStage; @@ -109,10 +114,10 @@ class CommentStore { * @return CommentStore */ public static function newKey( $key ) { - global $wgCommentTableSchemaMigrationStage; wfDeprecated( __METHOD__, '1.31' ); - $store = new CommentStore( MediaWikiServices::getInstance()->getContentLanguage(), - $wgCommentTableSchemaMigrationStage ); + $store = new CommentStore( + MediaWikiServices::getInstance()->getContentLanguage(), MIGRATION_NEW + ); $store->key = $key; return $store; } @@ -197,6 +202,7 @@ class CommentStore { * - fields: (string[]) to include in the `$vars` to `IDatabase->select()` * - joins: (array) to include in the `$join_conds` to `IDatabase->select()` * All tables, fields, and joins are aliased, so `+` is safe to use. + * @phan-return array{tables:string[],fields:string[],joins:array} */ public function getJoin( $key = null ) { $key = $this->getKey( $key );