Not used by any extensions known to Wikimedia git.
Change-Id: I3c07ad6db9d88feddad1cf29d4794fef622298ea
*/
public static function newKey( $key ) {
global $wgCommentTableSchemaMigrationStage;
- // TODO uncomment once not used in extensions
- // wfDeprecated( __METHOD__, '1.31' );
+ wfDeprecated( __METHOD__, '1.31' );
$store = new CommentStore( MediaWikiServices::getInstance()->getContentLanguage(),
$wgCommentTableSchemaMigrationStage );
$store->key = $key;
<?php
use MediaWiki\User\UserIdentity;
+use MediaWiki\MediaWikiServices;
use Wikimedia\TestingAccessWrapper;
/**
$userIdentity->method( 'getName' )->willReturn( $user->getName() );
$userIdentity->method( 'getActorId' )->willReturn( 0 );
- list( $cFields, $cCallback ) = CommentStore::newKey( 'rev_comment' )
- ->insertWithTempTable( $this->db, '' );
+ list( $cFields, $cCallback ) = MediaWikiServices::getInstance()->getCommentStore()
+ ->insertWithTempTable( $this->db, 'rev_comment', '' );
$m = $this->makeMigration( MIGRATION_WRITE_BOTH );
list( $fields, $callback ) =
$m->getInsertValuesWithTempTable( $this->db, 'rev_user', $userIdentity );
* @return CommentStore
*/
protected function makeStoreWithKey( $stage, $key ) {
+ $this->hideDeprecated( 'CommentStore::newKey' );
$store = CommentStore::newKey( $key );
TestingAccessWrapper::newFromObject( $store )->stage = $stage;
return $store;
}
public function testNewKey() {
+ $this->hideDeprecated( 'CommentStore::newKey' );
$this->assertInstanceOf( CommentStore::class, CommentStore::newKey( 'dummy' ) );
}