global $wgActorTableSchemaMigrationStage;
$reset = new \Wikimedia\ScopedCallback( function ( $v ) {
- global $wgActorTableSchemaMigrationStage;
- $wgActorTableSchemaMigrationStage = $v;
- $this->overrideMwServices();
+ $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', $v );
}, [ $wgActorTableSchemaMigrationStage ] );
- $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD;
- $this->overrideMwServices();
+ // Needs to WRITE_BOTH so READ_OLD tests below work. READ mode here doesn't really matter.
+ $this->setMwGlobals( 'wgActorTableSchemaMigrationStage',
+ SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW );
$users = [
User::newFromName( '192.168.2.2', false ),
$this->markTestSkippedIfDbType( 'sqlite' );
$this->setMwGlobals( 'wgActorTableSchemaMigrationStage', $stage );
- $this->overrideMwServices();
if ( isset( $params['ucuserids'] ) ) {
$params['ucuserids'] = implode( '|', array_map( 'User::idFromName', $params['ucuserids'] ) );
*/
public function testInterwikiUser( $stage ) {
$this->setMwGlobals( 'wgActorTableSchemaMigrationStage', $stage );
- $this->overrideMwServices();
$params = [
'action' => 'query',