MediaWiki master
SqlBagOStuff.php
Go to the documentation of this file.
1<?php
10namespace MediaWiki\ObjectCache;
11
12use Exception;
13use InvalidArgumentException;
15use Profiler;
16use stdClass;
17use UnexpectedValueException;
31use Wikimedia\ScopedCallback;
32use Wikimedia\Timestamp\ConvertibleTimestamp;
33use Wikimedia\Timestamp\TimestampFormat as TS;
34
52 protected $loadBalancer;
54 protected $dbDomain;
56 protected $useLB = false;
57
59 protected $serverInfos = [];
61 protected $serverTags = [];
63 protected $lastGarbageCollect = 0;
65 protected $purgePeriod = 10;
67 protected $purgeLimit = 100;
69 protected $numTableShards = 1;
71 protected $writeBatchSize = 100;
73 protected $tableName = 'objectcache';
74
76 protected $conns;
78 protected $connFailureTimes = [];
80 protected $connFailureErrors = [];
81
83 private $hasZlib;
84
86 private $dataRedundancy;
87
89 private const SAFE_CLOCK_BOUND_SEC = 15;
91 private const SAFE_PURGE_DELAY_SEC = 3600;
93 private const TOMB_SERIAL = '';
95 private const TOMB_EXPTIME = -self::SAFE_CLOCK_BOUND_SEC;
97 private const GC_DELAY_SEC = 1;
98
99 private const BLOB_VALUE = 0;
100 private const BLOB_EXPIRY = 1;
101 private const BLOB_CASTOKEN = 2;
102
109 private const INF_TIMESTAMP_PLACEHOLDER = '99991231235959';
110
138 public function __construct( $params ) {
139 parent::__construct( $params );
140
141 if ( isset( $params['servers'] ) || isset( $params['server'] ) ) {
142 // Configuration uses a direct list of servers.
143 // Object data is horizontally partitioned via key hash.
144 $index = 0;
145 foreach ( ( $params['servers'] ?? [ $params['server'] ] ) as $tag => $info ) {
146 $this->serverInfos[$index] = $info;
147 // Allow integer-indexes arrays for b/c
148 $this->serverTags[$index] = is_string( $tag ) ? $tag : "#$index";
149 ++$index;
150 }
151 } elseif ( isset( $params['loadBalancerCallback'] ) ) {
152 $this->loadBalancerCallback = $params['loadBalancerCallback'];
153 if ( !isset( $params['dbDomain'] ) ) {
154 throw new InvalidArgumentException(
155 __METHOD__ . ": 'dbDomain' is required if 'loadBalancerCallback' is given"
156 );
157 }
158 $this->dbDomain = $params['dbDomain'];
159 $this->useLB = true;
160 } else {
161 throw new InvalidArgumentException(
162 __METHOD__ . " requires 'server', 'servers', or 'loadBalancerCallback'"
163 );
164 }
165
166 $this->purgePeriod = intval( $params['purgePeriod'] ?? $this->purgePeriod );
167 $this->purgeLimit = intval( $params['purgeLimit'] ?? $this->purgeLimit );
168 $this->tableName = $params['tableName'] ?? $this->tableName;
169 $this->numTableShards = intval( $params['shards'] ?? $this->numTableShards );
170 $this->writeBatchSize = intval( $params['writeBatchSize'] ?? $this->writeBatchSize );
171 $this->dataRedundancy = min( intval( $params['dataRedundancy'] ?? 1 ), count( $this->serverTags ) );
172
174
175 $this->hasZlib = extension_loaded( 'zlib' );
176 }
177
179 protected function doGet( $key, $flags = 0, &$casToken = null ) {
180 $getToken = ( $casToken === self::PASS_BY_REF );
181 $casToken = null;
182
183 $data = $this->fetchBlobs( [ $key ], $getToken )[$key];
184 if ( $data ) {
185 $result = $this->unserialize( $data[self::BLOB_VALUE] );
186 if ( $getToken && $result !== false ) {
187 $casToken = $data[self::BLOB_CASTOKEN];
188 }
189 $valueSize = strlen( $data[self::BLOB_VALUE] );
190 } else {
191 $result = false;
192 $valueSize = false;
193 }
194
195 $this->updateOpStats( self::METRIC_OP_GET, [ $key => [ 0, $valueSize ] ] );
196
197 return $result;
198 }
199
201 protected function doSet( $key, $value, $exptime = 0, $flags = 0 ) {
202 $mtime = $this->getCurrentTime();
203
204 return $this->modifyBlobs(
205 $this->modifyTableSpecificBlobsForSet( ... ),
206 $mtime,
207 [ $key => [ $value, $exptime ] ]
208 );
209 }
210
212 protected function doDelete( $key, $flags = 0 ) {
213 $mtime = $this->getCurrentTime();
214
215 return $this->modifyBlobs(
216 $this->modifyTableSpecificBlobsForDelete( ... ),
217 $mtime,
218 [ $key => [] ]
219 );
220 }
221
223 protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) {
224 $mtime = $this->newLockingWriteSectionModificationTimestamp( $key, $scope );
225 if ( $mtime === null ) {
226 // Timeout or I/O error during lock acquisition
227 return false;
228 }
229
230 return $this->modifyBlobs(
231 $this->modifyTableSpecificBlobsForAdd( ... ),
232 $mtime,
233 [ $key => [ $value, $exptime ] ]
234 );
235 }
236
238 protected function doCas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
239 $mtime = $this->newLockingWriteSectionModificationTimestamp( $key, $scope );
240 if ( $mtime === null ) {
241 // Timeout or I/O error during lock acquisition
242 return false;
243 }
244
245 return $this->modifyBlobs(
246 $this->modifyTableSpecificBlobsForCas( ... ),
247 $mtime,
248 [ $key => [ $value, $exptime, $casToken ] ]
249 );
250 }
251
253 protected function doChangeTTL( $key, $exptime, $flags ) {
254 $mtime = $this->getCurrentTime();
255
256 return $this->modifyBlobs(
257 $this->modifyTableSpecificBlobsForChangeTTL( ... ),
258 $mtime,
259 [ $key => [ $exptime ] ]
260 );
261 }
262
264 protected function doIncrWithInit( $key, $exptime, $step, $init, $flags ) {
265 $mtime = $this->getCurrentTime();
266
267 if ( $flags & self::WRITE_BACKGROUND ) {
268 $callback = $this->modifyTableSpecificBlobsForIncrInitAsync( ... );
269 } else {
270 $callback = $this->modifyTableSpecificBlobsForIncrInit( ... );
271 }
272
273 $result = $this->modifyBlobs(
274 $callback,
275 $mtime,
276 [ $key => [ $step, $init, $exptime ] ],
277 $resByKey
278 ) ? $resByKey[$key] : false;
279
280 return $result;
281 }
282
284 protected function doGetMulti( array $keys, $flags = 0 ) {
285 $result = [];
286 $valueSizeByKey = [];
287
288 $dataByKey = $this->fetchBlobs( $keys );
289 foreach ( $keys as $key ) {
290 $data = $dataByKey[$key];
291 if ( $data ) {
292 $serialValue = $data[self::BLOB_VALUE];
293 $value = $this->unserialize( $serialValue );
294 if ( $value !== false ) {
295 $result[$key] = $value;
296 }
297 $valueSize = strlen( $serialValue );
298 } else {
299 $valueSize = false;
300 }
301 $valueSizeByKey[$key] = [ 0, $valueSize ];
302 }
303
304 $this->updateOpStats( self::METRIC_OP_GET, $valueSizeByKey );
305
306 return $result;
307 }
308
310 protected function doSetMulti( array $data, $exptime = 0, $flags = 0 ) {
311 $mtime = $this->getCurrentTime();
312
313 return $this->modifyBlobs(
314 $this->modifyTableSpecificBlobsForSet( ... ),
315 $mtime,
316 array_map(
317 static function ( $value ) use ( $exptime ) {
318 return [ $value, $exptime ];
319 },
320 $data
321 )
322 );
323 }
324
326 protected function doDeleteMulti( array $keys, $flags = 0 ) {
327 $mtime = $this->getCurrentTime();
328
329 return $this->modifyBlobs(
330 $this->modifyTableSpecificBlobsForDelete( ... ),
331 $mtime,
332 array_fill_keys( $keys, [] )
333 );
334 }
335
337 public function doChangeTTLMulti( array $keys, $exptime, $flags = 0 ) {
338 $mtime = $this->getCurrentTime();
339
340 return $this->modifyBlobs(
341 $this->modifyTableSpecificBlobsForChangeTTL( ... ),
342 $mtime,
343 array_fill_keys( $keys, [ $exptime ] )
344 );
345 }
346
355 private function getConnection( $shardIndex ) {
356 if ( $this->useLB ) {
357 return $this->getConnectionViaLoadBalancer();
358 }
359
360 // Don't keep timing out trying to connect if the server is down
361 if (
362 isset( $this->connFailureErrors[$shardIndex] ) &&
363 ( $this->getCurrentTime() - $this->connFailureTimes[$shardIndex] ) < 60
364 ) {
365 throw $this->connFailureErrors[$shardIndex];
366 }
367
368 if ( isset( $this->serverInfos[$shardIndex] ) ) {
369 $server = $this->serverInfos[$shardIndex];
370 $conn = $this->getConnectionFromServerInfo( $shardIndex, $server );
371 } else {
372 throw new UnexpectedValueException( "Invalid server index #$shardIndex" );
373 }
374
375 return $conn;
376 }
377
385 private function getShardIndexesForKey( $key, $fallback = false ) {
386 if ( $this->useLB || count( $this->serverTags ) === 1 ) {
387 return [ 0 ];
388 }
389
390 // Pick the same shard for sister keys
391 // Using the same hash stop as mc-router for consistency
392 [ $key ] = explode( '|#|', $key, 2 );
393
394 $sortedServers = $this->serverTags;
395 // shuffle the servers based on hashing of the keys
396 ArrayUtils::consistentHashSort( $sortedServers, $key );
397 $shardIndexes = array_keys( $sortedServers );
398 return array_slice(
399 $shardIndexes,
400 $fallback && $this->dataRedundancy === 1 ? 1 : 0,
401 $this->dataRedundancy
402 );
403 }
404
410 private function getTableNameForKey( $key ) {
411 if ( $this->numTableShards > 1 ) {
412 // Pick the same shard for sister keys
413 // Using the same hash stop as mc-router for consistency
414 [ $key ] = explode( '|#|', $key, 2 );
415
416 $hash = hexdec( substr( md5( $key ), 0, 8 ) ) & 0x7fffffff;
417 $tableIndex = $hash % $this->numTableShards;
418 } else {
419 $tableIndex = null;
420 }
421
422 return $this->getTableNameByShard( $tableIndex );
423 }
424
430 private function getTableNameByShard( $index ) {
431 if ( $index !== null && $this->numTableShards > 1 ) {
432 $decimals = strlen( (string)( $this->numTableShards - 1 ) );
433
434 return $this->tableName . sprintf( "%0{$decimals}d", $index );
435 }
436
437 return $this->tableName;
438 }
439
446 private function fetchBlobs( array $keys, bool $getCasToken = false, $fallback = false ) {
447 if ( $fallback && count( $this->serverTags ) > 1 && $this->dataRedundancy > 1 ) {
448 // fallback doesn't work with data redundancy
449 return [];
450 }
451
453 $silenceScope = $this->silenceTransactionProfiler();
454
455 // Initialize order-preserved per-key results; set values for live keys below
457 $dataByKey = array_fill_keys( $keys, null );
459 $dataByKeyAndShard = [];
460
461 $readTime = (int)$this->getCurrentTime();
462 $keysByTableByShard = [];
463 foreach ( $keys as $key ) {
464 $partitionTable = $this->getTableNameForKey( $key );
465 $shardIndexes = $this->getShardIndexesForKey( $key, $fallback );
466 foreach ( $shardIndexes as $shardIndex ) {
467 $keysByTableByShard[$shardIndex][$partitionTable][] = $key;
468 }
469 }
470 $fallbackResult = [];
471
472 foreach ( $keysByTableByShard as $shardIndex => $serverKeys ) {
473 try {
474 $db = $this->getConnection( $shardIndex );
475 foreach ( $serverKeys as $partitionTable => $tableKeys ) {
476 $res = $db->newSelectQueryBuilder()
477 ->select(
478 $getCasToken
479 ? $this->addCasTokenFields( $db, [ 'keyname', 'value', 'exptime' ] )
480 : [ 'keyname', 'value', 'exptime' ] )
481 ->from( $partitionTable )
482 ->where( $this->buildExistenceConditions( $db, $tableKeys, $readTime ) )
483 ->caller( __METHOD__ )
484 ->fetchResultSet();
485 foreach ( $res as $row ) {
486 $row->shardIndex = $shardIndex;
487 $row->tableName = $partitionTable;
488 $dataByKeyAndShard[$row->keyname][$shardIndex] = $row;
489 }
490 }
491 } catch ( DBError $e ) {
492 if ( $fallback ) {
493 $this->handleDBError( $e, $shardIndex );
494 } else {
495 $fallbackResult += $this->fetchBlobs(
496 array_merge( ...array_values( $serverKeys ) ),
497 $getCasToken,
498 true
499 );
500 }
501
502 }
503 }
504 foreach ( $keys as $key ) {
505 $row = null;
506 foreach ( $dataByKeyAndShard[$key] ?? [] as $r ) {
507 if ( !$row || $r->exptime > $row->exptime ) {
508 $row = $r;
509 }
510 }
511 if ( !$row ) {
512 continue;
513 }
514
515 $this->debug( __METHOD__ . ": retrieved $key; expiry time is {$row->exptime}" );
516 try {
517 $db = $this->getConnection( $row->shardIndex );
518 $dataByKey[$key] = [
519 self::BLOB_VALUE => $this->dbDecodeSerialValue( $db, $row->value ),
520 self::BLOB_EXPIRY => $this->decodeDbExpiry( $db, $row->exptime ),
521 self::BLOB_CASTOKEN => $getCasToken
522 ? $this->getCasTokenFromRow( $db, $row )
523 : null
524 ];
525 } catch ( DBQueryError $e ) {
526 $this->handleDBError( $e, $row->shardIndex );
527 }
528 }
529
530 return array_merge( $dataByKey, $fallbackResult );
531 }
532
547 private function modifyBlobs(
548 callable $tableWriteCallback,
549 float $mtime,
550 array $argsByKey,
551 &$resByKey = [],
552 $fallback = false
553 ) {
554 if ( $fallback && count( $this->serverTags ) > 1 && $this->dataRedundancy > 1 ) {
555 // fallback doesn't work with data redundancy
556 return false;
557 }
558 // Initialize order-preserved per-key results; callbacks mark successful results
559 $resByKey = array_fill_keys( array_keys( $argsByKey ), false );
560
562 $silenceScope = $this->silenceTransactionProfiler();
563
564 $argsByKeyByTableByShard = [];
565 foreach ( $argsByKey as $key => $args ) {
566 $partitionTable = $this->getTableNameForKey( $key );
567 $shardIndexes = $this->getShardIndexesForKey( $key, $fallback );
568 foreach ( $shardIndexes as $shardIndex ) {
569 $argsByKeyByTableByShard[$shardIndex][$partitionTable][$key] = $args;
570 }
571 }
572
573 $shardIndexesAffected = [];
574 foreach ( $argsByKeyByTableByShard as $shardIndex => $argsByKeyByTables ) {
575 foreach ( $argsByKeyByTables as $table => $ptKeyArgs ) {
576 try {
577 $db = $this->getConnection( $shardIndex );
578 $shardIndexesAffected[] = $shardIndex;
579 $tableWriteCallback( $db, $table, $mtime, $ptKeyArgs, $resByKey );
580 } catch ( DBError $e ) {
581 if ( $fallback ) {
582 $this->handleDBError( $e, $shardIndex );
583 continue;
584 } else {
585 $this->modifyBlobs( $tableWriteCallback, $mtime, $ptKeyArgs, $resByKey, true );
586 }
587 }
588 }
589 }
590
591 $success = !in_array( false, $resByKey, true );
592
593 foreach ( $shardIndexesAffected as $shardIndex ) {
594 try {
595 if (
596 // Random purging is enabled
597 $this->purgePeriod >= 1 &&
598 // Only purge on one in every $this->purgePeriod writes
599 mt_rand( 1, $this->purgePeriod ) == 1 &&
600 // Avoid repeating the delete within a few seconds
601 ( $this->getCurrentTime() - $this->lastGarbageCollect ) > self::GC_DELAY_SEC
602 ) {
603 $this->garbageCollect( $shardIndex );
604 }
605 } catch ( DBError $e ) {
606 $this->handleDBError( $e, $shardIndex );
607 }
608 }
609
610 return $success;
611 }
612
623 private function modifyTableSpecificBlobsForSet(
624 IDatabase $db,
625 string $ptable,
626 float $mtime,
627 array $argsByKey,
628 array &$resByKey
629 ) {
630 $valueSizesByKey = [];
631
632 $rows = [];
633 foreach ( $argsByKey as $key => [ $value, $exptime ] ) {
634 $expiry = $this->makeNewKeyExpiry( $exptime, (int)$mtime );
635 $serialValue = $this->getSerialized( $value, $key );
636 $rows[] = $this->buildUpsertRow( $db, $key, $serialValue, $expiry );
637
638 $valueSizesByKey[$key] = [ strlen( $serialValue ), 0 ];
639 }
640
641 // T288998: use REPLACE, if possible, to avoid cluttering the binlogs
642 $db->newReplaceQueryBuilder()
643 ->replaceInto( $ptable )
644 ->rows( $rows )
645 ->uniqueIndexFields( [ 'keyname' ] )
646 ->caller( __METHOD__ )->execute();
647
648 foreach ( $argsByKey as $key => $unused ) {
649 $resByKey[$key] = true;
650 }
651
652 $this->updateOpStats( self::METRIC_OP_SET, $valueSizesByKey );
653 }
654
666 private function modifyTableSpecificBlobsForDelete(
667 IDatabase $db,
668 string $ptable,
669 float $mtime,
670 array $argsByKey,
671 array &$resByKey
672 ) {
673 // Just purge the keys since there is only one primary (e.g. "source of truth")
674 $db->newDeleteQueryBuilder()
675 ->deleteFrom( $ptable )
676 ->where( [ 'keyname' => array_keys( $argsByKey ) ] )
677 ->caller( __METHOD__ )->execute();
678
679 foreach ( $argsByKey as $key => $arg ) {
680 $resByKey[$key] = true;
681 }
682
683 $this->updateOpStats( self::METRIC_OP_DELETE, array_keys( $argsByKey ) );
684 }
685
701 private function modifyTableSpecificBlobsForAdd(
702 IDatabase $db,
703 string $ptable,
704 float $mtime,
705 array $argsByKey,
706 array &$resByKey
707 ) {
708 $valueSizesByKey = [];
709
710 // This check must happen outside the write query to respect eventual consistency
711 $existingKeys = $db->newSelectQueryBuilder()
712 ->select( 'keyname' )
713 ->from( $ptable )
714 ->where( $this->buildExistenceConditions( $db, array_keys( $argsByKey ), (int)$mtime ) )
715 ->caller( __METHOD__ )
716 ->fetchFieldValues();
717 $existingByKey = array_fill_keys( $existingKeys, true );
718
719 $rows = [];
720 foreach ( $argsByKey as $key => [ $value, $exptime ] ) {
721 if ( isset( $existingByKey[$key] ) ) {
722 $this->logger->debug( __METHOD__ . ": $key already exists" );
723 continue;
724 }
725
726 $serialValue = $this->getSerialized( $value, $key );
727 $expiry = $this->makeNewKeyExpiry( $exptime, (int)$mtime );
728 $valueSizesByKey[$key] = [ strlen( $serialValue ), 0 ];
729 $rows[] = $this->buildUpsertRow( $db, $key, $serialValue, $expiry );
730 }
731 if ( !$rows ) {
732 return;
733 }
734 $db->newInsertQueryBuilder()
735 ->insertInto( $ptable )
736 ->rows( $rows )
737 ->onDuplicateKeyUpdate()
738 ->uniqueIndexFields( [ 'keyname' ] )
739 ->set( $this->buildMultiUpsertSetForOverwrite( $db ) )
740 ->caller( __METHOD__ )->execute();
741
742 foreach ( $argsByKey as $key => $unused ) {
743 $resByKey[$key] = !isset( $existingByKey[$key] );
744 }
745
746 $this->updateOpStats( self::METRIC_OP_ADD, $valueSizesByKey );
747 }
748
764 private function modifyTableSpecificBlobsForCas(
765 IDatabase $db,
766 string $ptable,
767 float $mtime,
768 array $argsByKey,
769 array &$resByKey
770 ) {
771 $valueSizesByKey = [];
772
773 // This check must happen outside the write query to respect eventual consistency
774 $res = $db->newSelectQueryBuilder()
775 ->select( $this->addCasTokenFields( $db, [ 'keyname' ] ) )
776 ->from( $ptable )
777 ->where( $this->buildExistenceConditions( $db, array_keys( $argsByKey ), (int)$mtime ) )
778 ->caller( __METHOD__ )
779 ->fetchResultSet();
780
781 $curTokensByKey = [];
782 foreach ( $res as $row ) {
783 $curTokensByKey[$row->keyname] = $this->getCasTokenFromRow( $db, $row );
784 }
785
786 $nonMatchingByKey = [];
787 $rows = [];
788 foreach ( $argsByKey as $key => [ $value, $exptime, $casToken ] ) {
789 $curToken = $curTokensByKey[$key] ?? null;
790 if ( $curToken === null ) {
791 $nonMatchingByKey[$key] = true;
792 $this->logger->debug( __METHOD__ . ": $key does not exists" );
793 continue;
794 }
795
796 if ( $curToken !== $casToken ) {
797 $nonMatchingByKey[$key] = true;
798 $this->logger->debug( __METHOD__ . ": $key does not have a matching token" );
799 continue;
800 }
801
802 $serialValue = $this->getSerialized( $value, $key );
803 $expiry = $this->makeNewKeyExpiry( $exptime, (int)$mtime );
804 $valueSizesByKey[$key] = [ strlen( $serialValue ), 0 ];
805
806 $rows[] = $this->buildUpsertRow( $db, $key, $serialValue, $expiry );
807 }
808 if ( !$rows ) {
809 return;
810 }
811 $db->newInsertQueryBuilder()
812 ->insertInto( $ptable )
813 ->rows( $rows )
814 ->onDuplicateKeyUpdate()
815 ->uniqueIndexFields( [ 'keyname' ] )
816 ->set( $this->buildMultiUpsertSetForOverwrite( $db ) )
817 ->caller( __METHOD__ )->execute();
818
819 foreach ( $argsByKey as $key => $unused ) {
820 $resByKey[$key] = !isset( $nonMatchingByKey[$key] );
821 }
822
823 $this->updateOpStats( self::METRIC_OP_CAS, $valueSizesByKey );
824 }
825
845 private function modifyTableSpecificBlobsForChangeTTL(
846 IDatabase $db,
847 string $ptable,
848 float $mtime,
849 array $argsByKey,
850 array &$resByKey
851 ) {
852 $keysBatchesByExpiry = [];
853 foreach ( $argsByKey as $key => [ $exptime ] ) {
854 $expiry = $this->makeNewKeyExpiry( $exptime, (int)$mtime );
855 $keysBatchesByExpiry[$expiry][] = $key;
856 }
857
858 $existingCount = 0;
859 foreach ( $keysBatchesByExpiry as $expiry => $keyBatch ) {
860 $db->newUpdateQueryBuilder()
861 ->update( $ptable )
862 ->set( [ 'exptime' => $this->encodeDbExpiry( $db, $expiry ) ] )
863 ->where( $this->buildExistenceConditions( $db, $keyBatch, (int)$mtime ) )
864 ->caller( __METHOD__ )->execute();
865 $existingCount += $db->affectedRows();
866 }
867 if ( $existingCount === count( $argsByKey ) ) {
868 foreach ( $argsByKey as $key => $args ) {
869 $resByKey[$key] = true;
870 }
871 }
872
873 $this->updateOpStats( self::METRIC_OP_CHANGE_TTL, array_keys( $argsByKey ) );
874 }
875
895 private function modifyTableSpecificBlobsForIncrInit(
896 IDatabase $db,
897 string $ptable,
898 float $mtime,
899 array $argsByKey,
900 array &$resByKey
901 ) {
902 foreach ( $argsByKey as $key => [ $step, $init, $exptime ] ) {
903 $expiry = $this->makeNewKeyExpiry( $exptime, (int)$mtime );
904
905 // Use a transaction so that changes from other threads are not visible due to
906 // "consistent reads". This way, the exact post-increment value can be returned.
907 // The "live key exists" check can go inside the write query and remain safe for
908 // replication since the TTL for such keys is either indefinite or very short.
909 $atomic = $db->startAtomic( __METHOD__, IDatabase::ATOMIC_CANCELABLE );
910 try {
911 $db->newInsertQueryBuilder()
912 ->insertInto( $ptable )
913 ->rows( $this->buildUpsertRow( $db, $key, $init, $expiry ) )
914 ->onDuplicateKeyUpdate()
915 ->uniqueIndexFields( [ 'keyname' ] )
916 ->set( $this->buildIncrUpsertSet( $db, $step, $init, $expiry, (int)$mtime ) )
917 ->caller( __METHOD__ )->execute();
918 $affectedCount = $db->affectedRows();
919 $row = $db->newSelectQueryBuilder()
920 ->select( 'value' )
921 ->from( $ptable )
922 ->where( [ 'keyname' => $key ] )
923 ->caller( __METHOD__ )
924 ->fetchRow();
925 } catch ( Exception $e ) {
926 $db->cancelAtomic( __METHOD__, $atomic );
927 throw $e;
928 }
929 $db->endAtomic( __METHOD__ );
930
931 if ( !$affectedCount || $row === false ) {
932 $this->logger->warning( __METHOD__ . ": failed to set new $key value" );
933 continue;
934 }
935
936 $serialValue = $this->dbDecodeSerialValue( $db, $row->value );
937 if ( !$this->isInteger( $serialValue ) ) {
938 $this->logger->warning( __METHOD__ . ": got non-integer $key value" );
939 continue;
940 }
941
942 $resByKey[$key] = (int)$serialValue;
943 }
944
945 $this->updateOpStats( self::METRIC_OP_INCR, array_keys( $argsByKey ) );
946 }
947
959 private function modifyTableSpecificBlobsForIncrInitAsync(
960 IDatabase $db,
961 string $ptable,
962 float $mtime,
963 array $argsByKey,
964 array &$resByKey
965 ) {
966 foreach ( $argsByKey as $key => [ $step, $init, $exptime ] ) {
967 $expiry = $this->makeNewKeyExpiry( $exptime, (int)$mtime );
968 $db->newInsertQueryBuilder()
969 ->insertInto( $ptable )
970 ->rows( $this->buildUpsertRow( $db, $key, $init, $expiry ) )
971 ->onDuplicateKeyUpdate()
972 ->uniqueIndexFields( [ 'keyname' ] )
973 ->set( $this->buildIncrUpsertSet( $db, $step, $init, $expiry, (int)$mtime ) )
974 ->caller( __METHOD__ )->execute();
975 if ( !$db->affectedRows() ) {
976 $this->logger->warning( __METHOD__ . ": failed to set new $key value" );
977 } else {
978 $resByKey[$key] = true;
979 }
980 }
981 }
982
988 private function makeNewKeyExpiry( $exptime, int $nowTsUnix ) {
989 $expiry = $this->getExpirationAsTimestamp( $exptime );
990 // Eventual consistency requires the preservation of recently modified keys.
991 // Do not create rows with `exptime` fields so low that they might get garbage
992 // collected before being replicated.
993 if ( $expiry !== self::TTL_INDEFINITE ) {
994 $expiry = max( $expiry, $nowTsUnix - self::SAFE_CLOCK_BOUND_SEC );
995 }
996
997 return $expiry;
998 }
999
1018 private function newLockingWriteSectionModificationTimestamp( $key, &$scope ) {
1019 if ( !$this->lock( $key, 0 ) ) {
1020 return null;
1021 }
1022
1023 $scope = new ScopedCallback( function () use ( $key ) {
1024 $this->unlock( $key );
1025 } );
1026
1027 // sprintf is used to adjust precision
1028 return (float)sprintf( '%.6F', $this->locks[$key][self::LOCK_TIME] );
1029 }
1030
1039 private function buildExistenceConditions( IDatabase $db, $keys, int $time ) {
1040 // Note that tombstones always have past expiration dates
1041 return [
1042 'keyname' => $keys,
1043 $db->expr( 'exptime', '>=', $db->timestamp( $time ) )
1044 ];
1045 }
1046
1056 private function buildUpsertRow(
1057 IDatabase $db,
1058 $key,
1059 $serialValue,
1060 int $expiry
1061 ) {
1062 $row = [
1063 'keyname' => $key,
1064 'value' => $this->dbEncodeSerialValue( $db, $serialValue ),
1065 'exptime' => $this->encodeDbExpiry( $db, $expiry )
1066 ];
1067
1068 return $row;
1069 }
1070
1077 private function buildMultiUpsertSetForOverwrite( IDatabase $db ) {
1078 $expressionsByColumn = [
1079 'value' => $db->buildExcludedValue( 'value' ),
1080 'exptime' => $db->buildExcludedValue( 'exptime' )
1081 ];
1082
1083 $set = [];
1084 foreach ( $expressionsByColumn as $column => $updateExpression ) {
1085 $set[$column] = new RawSQLValue( $updateExpression );
1086 }
1087
1088 return $set;
1089 }
1090
1101 private function buildIncrUpsertSet(
1102 IDatabase $db,
1103 int $step,
1104 int $init,
1105 int $expiry,
1106 int $mtUnixTs
1107 ) {
1108 // Map of (column => (SQL for non-expired key rows, SQL for expired key rows))
1109 $expressionsByColumn = [
1110 'value' => [
1111 $db->buildIntegerCast( 'value' ) . " + {$db->addQuotes( $step )}",
1112 $db->addQuotes( $this->dbEncodeSerialValue( $db, $init ) )
1113 ],
1114 'exptime' => [
1115 'exptime',
1116 $db->addQuotes( $this->encodeDbExpiry( $db, $expiry ) )
1117 ]
1118 ];
1119
1120 $set = [];
1121 foreach ( $expressionsByColumn as $column => [ $updateExpression, $initExpression ] ) {
1122 $rhs = $db->conditional(
1123 $db->expr( 'exptime', '>=', $db->timestamp( $mtUnixTs ) ),
1124 $updateExpression,
1125 $initExpression
1126 );
1127 $set[$column] = new RawSQLValue( $rhs );
1128 }
1129
1130 return $set;
1131 }
1132
1138 private function encodeDbExpiry( IDatabase $db, int $expiry ) {
1139 return ( $expiry === self::TTL_INDEFINITE )
1140 // Use the maximum timestamp that the column can store
1141 ? $db->timestamp( self::INF_TIMESTAMP_PLACEHOLDER )
1142 // Convert the absolute timestamp into the DB timestamp format
1143 : $db->timestamp( $expiry );
1144 }
1145
1151 private function decodeDbExpiry( IDatabase $db, string $dbExpiry ) {
1152 return ( $dbExpiry === $db->timestamp( self::INF_TIMESTAMP_PLACEHOLDER ) )
1153 ? self::TTL_INDEFINITE
1154 : (int)ConvertibleTimestamp::convert( TS::UNIX, $dbExpiry );
1155 }
1156
1162 private function dbEncodeSerialValue( IDatabase $db, $serialValue ) {
1163 return is_int( $serialValue ) ? (string)$serialValue : $db->encodeBlob( $serialValue );
1164 }
1165
1171 private function dbDecodeSerialValue( IDatabase $db, $blob ) {
1172 return $this->isInteger( $blob ) ? (int)$blob : $db->decodeBlob( $blob );
1173 }
1174
1182 private function addCasTokenFields( IDatabase $db, array $fields ) {
1183 $type = $db->getType();
1184
1185 if ( $type === 'mysql' ) {
1186 $fields['castoken'] = $db->buildConcat( [
1187 'SHA1(value)',
1188 $db->addQuotes( '@' ),
1189 'exptime'
1190 ] );
1191 } elseif ( $type === 'postgres' ) {
1192 $fields['castoken'] = $db->buildConcat( [
1193 'md5(value)',
1194 $db->addQuotes( '@' ),
1195 'exptime'
1196 ] );
1197 } else {
1198 if ( !in_array( 'value', $fields, true ) ) {
1199 $fields[] = 'value';
1200 }
1201 if ( !in_array( 'exptime', $fields, true ) ) {
1202 $fields[] = 'exptime';
1203 }
1204 }
1205
1206 return $fields;
1207 }
1208
1216 private function getCasTokenFromRow( IDatabase $db, stdClass $row ) {
1217 if ( isset( $row->castoken ) ) {
1218 $token = $row->castoken;
1219 } else {
1220 $token = sha1( $this->dbDecodeSerialValue( $db, $row->value ) ) . '@' . $row->exptime;
1221 $this->logger->debug( __METHOD__ . ": application computed hash for CAS token" );
1222 }
1223
1224 return $token;
1225 }
1226
1231 private function garbageCollect( $shardIndex ) {
1232 // set right away, avoid queuing duplicate async callbacks
1233 $this->lastGarbageCollect = $this->getCurrentTime();
1234
1235 $garbageCollector = function () use ( $shardIndex ) {
1236 $db = $this->getConnection( $shardIndex );
1238 $silenceScope = $this->silenceTransactionProfiler();
1239 $this->deleteServerObjectsExpiringBefore(
1240 $db,
1241 (int)$this->getCurrentTime(),
1242 $this->purgeLimit
1243 );
1244 $this->lastGarbageCollect = $this->getCurrentTime();
1245 };
1246
1247 if ( $this->asyncHandler ) {
1248 ( $this->asyncHandler )( $garbageCollector );
1249 } else {
1250 $garbageCollector();
1251 }
1252 }
1253
1256 $timestamp,
1257 ?callable $progress = null,
1258 $limit = INF,
1259 ?string $tag = null
1260 ) {
1262 $silenceScope = $this->silenceTransactionProfiler();
1263
1264 if ( $tag !== null ) {
1265 // Purge one server only, to support concurrent purging in large wiki farms (T282761).
1266 $shardIndexes = [];
1267 if ( !$this->serverTags ) {
1268 throw new InvalidArgumentException( "Given a tag but no tags are configured" );
1269 }
1270 foreach ( $this->serverTags as $serverShardIndex => $serverTag ) {
1271 if ( $tag === $serverTag ) {
1272 $shardIndexes[] = $serverShardIndex;
1273 break;
1274 }
1275 }
1276 if ( !$shardIndexes ) {
1277 throw new InvalidArgumentException( "Unknown server tag: $tag" );
1278 }
1279 } else {
1280 $shardIndexes = $this->getShardServerIndexes();
1281 shuffle( $shardIndexes );
1282 }
1283
1284 $ok = true;
1285 $numServers = count( $shardIndexes );
1286
1287 $keysDeletedCount = 0;
1288 foreach ( $shardIndexes as $numServersDone => $shardIndex ) {
1289 try {
1290 $db = $this->getConnection( $shardIndex );
1291
1292 // Avoid deadlock (T330377)
1293 $lockKey = "SqlBagOStuff-purge-shard:$shardIndex";
1294 if ( !$db->lock( $lockKey, __METHOD__, 0 ) ) {
1295 $this->logger->info( "SqlBagOStuff purge for shard $shardIndex already locked, skip" );
1296 continue;
1297 }
1298
1299 $this->deleteServerObjectsExpiringBefore(
1300 $db,
1301 $timestamp,
1302 $limit,
1303 $keysDeletedCount,
1304 [ 'fn' => $progress, 'serversDone' => $numServersDone, 'serversTotal' => $numServers ]
1305 );
1306 $db->unlock( $lockKey, __METHOD__ );
1307 } catch ( DBError $e ) {
1308 $this->handleDBError( $e, $shardIndex );
1309 $ok = false;
1310 }
1311 }
1312
1313 return $ok;
1314 }
1315
1325 private function deleteServerObjectsExpiringBefore(
1326 IDatabase $db,
1327 $timestamp,
1328 $limit,
1329 &$keysDeletedCount = 0,
1330 ?array $progress = null
1331 ) {
1332 $cutoffUnix = (int)ConvertibleTimestamp::convert( TS::UNIX, $timestamp );
1333 $tableIndexes = range( 0, $this->numTableShards - 1 );
1334 shuffle( $tableIndexes );
1335
1336 $batchSize = min( $this->writeBatchSize, $limit );
1337
1338 foreach ( $tableIndexes as $numShardsDone => $tableIndex ) {
1339 // don't do more than 10% of tables. To avoid overwhelming
1340 // when there are too many of them. Add one to make sure small number
1341 // of tables have been taken care of.
1342 if (
1343 $numShardsDone > ( ( $this->numTableShards / 10 ) + 1 ) &&
1344 // running in context of purge maint script. Go through all tables
1345 $limit !== INF
1346 ) {
1347 break;
1348 }
1349
1350 // The oldest expiry of a row we have deleted on this shard
1351 // (the first row that we deleted)
1352 $minExpUnix = null;
1353 // The most recent expiry time so far, from a row we have deleted on this shard
1354 $maxExp = null;
1355 // Size of the time range we'll delete, in seconds (for progress estimate)
1356 $totalSeconds = null;
1357
1358 do {
1359 $res = $db->newSelectQueryBuilder()
1360 ->select( [ 'keyname', 'exptime' ] )
1361 ->from( $this->getTableNameByShard( $tableIndex ) )
1362 ->where( $db->expr( 'exptime', '<', $db->timestamp( $cutoffUnix ) ) )
1363 ->andWhere( $maxExp ? $db->expr( 'exptime', '>=', $maxExp ) : [] )
1364 ->orderBy( 'exptime', SelectQueryBuilder::SORT_ASC )
1365 ->limit( $batchSize )
1366 ->caller( __METHOD__ )
1367 ->fetchResultSet();
1368
1369 if ( $res->numRows() ) {
1370 $row = $res->current();
1371 if ( $minExpUnix === null ) {
1372 $minExpUnix = (int)ConvertibleTimestamp::convert( TS::UNIX, $row->exptime );
1373 $totalSeconds = max( $cutoffUnix - $minExpUnix, 1 );
1374 }
1375
1376 $keys = [];
1377 foreach ( $res as $row ) {
1378 $keys[] = $row->keyname;
1379 $maxExp = $row->exptime;
1380 }
1381
1383 ->deleteFrom( $this->getTableNameByShard( $tableIndex ) )
1384 ->where( [
1385 'keyname' => $keys,
1386 $db->expr( 'exptime', '<', $db->timestamp( $cutoffUnix ) ),
1387 ] )
1388 ->caller( __METHOD__ )->execute();
1389 $keysDeletedCount += $db->affectedRows();
1390 }
1391
1392 if ( $progress && is_callable( $progress['fn'] ) ) {
1393 if ( $totalSeconds ) {
1394 $maxExpUnix = (int)ConvertibleTimestamp::convert( TS::UNIX, $maxExp );
1395 $remainingSeconds = $cutoffUnix - $maxExpUnix;
1396 $processedSeconds = max( $totalSeconds - $remainingSeconds, 0 );
1397 // For example, if we've done 1.5 table shard, and are thus half-way on the
1398 // 2nd of perhaps 5 tables on this server, then this might be:
1399 // `( 1 + ( 43200 / 86400 ) ) / 5 = 0.3`, or 30% done, of tables on this server.
1400 $tablesDoneRatio =
1401 ( $numShardsDone + ( $processedSeconds / $totalSeconds ) ) / $this->numTableShards;
1402 } else {
1403 $tablesDoneRatio = 1;
1404 }
1405
1406 // For example, if we're 30% done on the last of 10 servers, then this might be:
1407 // `( 9 / 10 ) + ( 0.3 / 10 ) = 0.93`, or 93% done, overall.
1408 $overallRatio = ( $progress['serversDone'] / $progress['serversTotal'] ) +
1409 ( $tablesDoneRatio / $progress['serversTotal'] );
1410 ( $progress['fn'] )( (int)( $overallRatio * 100 ) );
1411 }
1412 } while ( $res->numRows() && $keysDeletedCount < $limit );
1413 }
1414 }
1415
1417 public function doLock( $key, $timeout = 6, $exptime = 6 ) {
1419 $silenceScope = $this->silenceTransactionProfiler();
1420
1421 $lockTsUnix = null;
1422
1423 $shardIndexes = $this->getShardIndexesForKey( $key );
1424 foreach ( $shardIndexes as $shardIndex ) {
1425 try {
1426 $db = $this->getConnection( $shardIndex );
1427 $lockTsUnix = $db->lock( $key, __METHOD__, $timeout, $db::LOCK_TIMESTAMP );
1428 } catch ( DBError $e ) {
1429 $this->handleDBError( $e, $shardIndex );
1430 $this->logger->warning(
1431 __METHOD__ . ' failed due to I/O error for {key}.',
1432 [ 'key' => $key ]
1433 );
1434 }
1435 }
1436
1437 return $lockTsUnix;
1438 }
1439
1441 public function doUnlock( $key ) {
1443 $silenceScope = $this->silenceTransactionProfiler();
1444
1445 $shardIndexes = $this->getShardIndexesForKey( $key );
1446 $released = false;
1447 foreach ( $shardIndexes as $shardIndex ) {
1448 try {
1449 $db = $this->getConnection( $shardIndex );
1450 $released = $db->unlock( $key, __METHOD__ );
1451 } catch ( DBError $e ) {
1452 $this->handleDBError( $e, $shardIndex );
1453 $released = false;
1454 }
1455 }
1456
1457 return $released;
1458 }
1459
1461 protected function makeKeyInternal( $keyspace, $components ) {
1462 $key = strtr( $keyspace, ' ', '_' );
1463 foreach ( $components as $component ) {
1464 $component = strtr( $component ?? '', [
1465 ' ' => '_', // Avoid unnecessary misses from pre-1.35 code
1466 ':' => '%3A',
1467 ] );
1468 $key .= ':' . $component;
1469 }
1470
1471 // SQL schema for 'objectcache' specifies keys as varchar(255).
1472 // * Reserve 45 chars for prefixes used by wrappers like WANObjectCache.
1473 return $this->makeFallbackKey( $key, 205 );
1474 }
1475
1476 protected function requireConvertGenericKey(): bool {
1477 return true;
1478 }
1479
1481 protected function serialize( $value ) {
1482 if ( is_int( $value ) ) {
1483 return $value;
1484 }
1485
1486 $serial = serialize( $value );
1487 if ( $this->hasZlib ) {
1488 // On typical message and page data, this can provide a 3X storage savings
1489 $serial = gzdeflate( $serial );
1490 }
1491
1492 return $serial;
1493 }
1494
1496 protected function unserialize( $value ) {
1497 if ( $value === self::TOMB_SERIAL ) {
1498 return false; // tombstone
1499 }
1500
1501 if ( $this->isInteger( $value ) ) {
1502 return (int)$value;
1503 }
1504
1505 if ( $this->hasZlib ) {
1506 // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
1507 $decompressed = @gzinflate( $value );
1508
1509 if ( $decompressed !== false ) {
1510 $value = $decompressed;
1511 }
1512 }
1513
1514 return unserialize( $value );
1515 }
1516
1517 private function getLoadBalancer(): ILoadBalancer {
1518 if ( !$this->loadBalancer ) {
1519 $this->loadBalancer = ( $this->loadBalancerCallback )();
1520 }
1521 return $this->loadBalancer;
1522 }
1523
1528 private function getConnectionViaLoadBalancer() {
1529 $lb = $this->getLoadBalancer();
1530
1531 if ( $lb->getServerAttributes( ServerInfo::WRITER_INDEX )[Database::ATTR_DB_LEVEL_LOCKING] ) {
1532 // Use the main connection to avoid transaction deadlocks
1533 $conn = $lb->getMaintenanceConnectionRef( DB_PRIMARY, [], $this->dbDomain );
1534 } else {
1535 // If the RDBMS has row/table/page level locking, then use separate auto-commit
1536 // connection to avoid needless contention and deadlocks.
1537 $conn = $lb->getMaintenanceConnectionRef(
1538 DB_PRIMARY,
1539 [],
1540 $this->dbDomain,
1541 $lb::CONN_TRX_AUTOCOMMIT
1542 );
1543 }
1544
1545 // Make sure any errors are thrown now while we can more easily handle them
1546 $conn->ensureConnection();
1547 return $conn;
1548 }
1549
1556 private function getConnectionFromServerInfo( $shardIndex, array $server ) {
1557 if ( !isset( $this->conns[$shardIndex] ) ) {
1558 $server['logger'] = $this->logger;
1559 // Always use autocommit mode, even if DBO_TRX is configured
1560 $server['flags'] ??= 0;
1561 $server['flags'] &= ~( IDatabase::DBO_TRX | IDatabase::DBO_DEFAULT );
1562
1564 $conn = MediaWikiServices::getInstance()->getDatabaseFactory()
1565 ->create( $server['type'], $server );
1566
1567 // Automatically create the objectcache table for sqlite as needed
1568 if ( $conn->getType() === 'sqlite' ) {
1569 $this->initSqliteDatabase( $conn );
1570 }
1571 $this->conns[$shardIndex] = $conn;
1572 }
1573
1574 // @phan-suppress-next-line PhanTypeMismatchReturnNullable False positive
1575 return $this->conns[$shardIndex];
1576 }
1577
1584 private function handleDBError( DBError $exception, $shardIndex ) {
1585 if ( !$this->useLB && $exception instanceof DBConnectionError ) {
1586 unset( $this->conns[$shardIndex] ); // bug T103435
1587
1588 $now = $this->getCurrentTime();
1589 if ( isset( $this->connFailureTimes[$shardIndex] ) ) {
1590 if ( $now - $this->connFailureTimes[$shardIndex] >= 60 ) {
1591 unset( $this->connFailureTimes[$shardIndex] );
1592 unset( $this->connFailureErrors[$shardIndex] );
1593 } else {
1594 $this->logger->debug( __METHOD__ . ": Server #$shardIndex already down" );
1595 return;
1596 }
1597 }
1598 $this->logger->info( __METHOD__ . ": Server #$shardIndex down until " . ( $now + 60 ) );
1599 $this->connFailureTimes[$shardIndex] = $now;
1600 $this->connFailureErrors[$shardIndex] = $exception;
1601 }
1602 $this->logger->error( "DBError: {$exception->getMessage()}", [ 'exception' => $exception ] );
1603 if ( $exception instanceof DBConnectionError ) {
1604 $this->setLastError( self::ERR_UNREACHABLE );
1605 $this->logger->warning( __METHOD__ . ": ignoring connection error" );
1606 } else {
1607 $this->setLastError( self::ERR_UNEXPECTED );
1608 $this->logger->warning( __METHOD__ . ": ignoring query error" );
1609 }
1610 }
1611
1616 private function initSqliteDatabase( IMaintainableDatabase $db ) {
1617 if ( $db->tableExists( 'objectcache', __METHOD__ ) ) {
1618 return;
1619 }
1620 // Use one table for SQLite; sharding does not seem to have much benefit
1621 $db->query( "PRAGMA journal_mode=WAL", __METHOD__ ); // this is permanent
1622 $db->startAtomic( __METHOD__ ); // atomic DDL
1623 try {
1624 $encTable = $db->tableName( 'objectcache' );
1625 $encExptimeIndex = $db->addIdentifierQuotes( $db->tablePrefix() . 'exptime' );
1626 $db->query(
1627 "CREATE TABLE $encTable (\n" .
1628 " keyname BLOB NOT NULL default '' PRIMARY KEY,\n" .
1629 " value BLOB,\n" .
1630 " exptime BLOB NOT NULL\n" .
1631 ")",
1632 __METHOD__
1633 );
1634 $db->query( "CREATE INDEX $encExptimeIndex ON $encTable (exptime)", __METHOD__ );
1635 $db->endAtomic( __METHOD__ );
1636 } catch ( DBError $e ) {
1637 $db->rollback( __METHOD__ );
1638 throw $e;
1639 }
1640 }
1641
1659 public function createTables() {
1660 foreach ( $this->getShardServerIndexes() as $shardIndex ) {
1661 $db = $this->getConnection( $shardIndex );
1662 if ( in_array( $db->getType(), [ 'mysql', 'postgres' ], true ) ) {
1663 for ( $i = 0; $i < $this->numTableShards; $i++ ) {
1664 $encBaseTable = $db->tableName( 'objectcache' );
1665 $encShardTable = $db->tableName( $this->getTableNameByShard( $i ) );
1666 $db->query( "CREATE TABLE IF NOT EXISTS $encShardTable LIKE $encBaseTable", __METHOD__ );
1667 }
1668 }
1669 }
1670 }
1671
1675 private function getShardServerIndexes() {
1676 if ( $this->useLB ) {
1677 // LoadBalancer based configuration
1678 $shardIndexes = [ 0 ];
1679 } else {
1680 // Striped array of database servers
1681 $shardIndexes = array_keys( $this->serverTags );
1682 }
1683
1684 return $shardIndexes;
1685 }
1686
1690 #[\NoDiscard]
1691 private function silenceTransactionProfiler(): ?ScopedCallback {
1692 if ( $this->serverInfos ) {
1693 return null; // no TransactionProfiler injected anyway
1694 }
1695 return Profiler::instance()->getTransactionProfiler()->silenceForScope();
1696 }
1697}
1698
1700class_alias( SqlBagOStuff::class, 'SqlBagOStuff' );
$fallback
const DB_PRIMARY
Definition defines.php:28
if(!defined('MW_SETUP_CALLBACK'))
Definition WebStart.php:69
Service locator for MediaWiki core services.
RDBMS-based caching module.
requireConvertGenericKey()
Whether ::proxyCall() must re-encode cache keys before calling read/write methods.
doChangeTTL( $key, $exptime, $flags)
bool
__construct( $params)
Create a new backend instance from parameters injected by ObjectCache::newFromParams()
doLock( $key, $timeout=6, $exptime=6)
MediumSpecificBagOStuff::lock()float|null UNIX timestamp of acquisition; null on failure
doSetMulti(array $data, $exptime=0, $flags=0)
bool Success
doIncrWithInit( $key, $exptime, $step, $init, $flags)
int|bool New value or false on failure
float[] $connFailureTimes
Map of (shard index => UNIX timestamps)
bool $useLB
Whether to use the LoadBalancer.
serialize( $value)
string|int|false String/integer representation Special handling is usually needed for integers so inc...
doGet( $key, $flags=0, &$casToken=null)
Get an item.The CAS token should be null if the key does not exist or the value is corruptmixed Retur...
callable null $loadBalancerCallback
Injected function which returns a LoadBalancer.
unserialize( $value)
mixed Original value or false on error Special handling is usually needed for integers so incr()/decr...
int $numTableShards
Number of table shards to use on each server.
string false null $dbDomain
DB name used for keys using the LoadBalancer.
doCas( $casToken, $key, $value, $exptime=0, $flags=0)
Set an item if the current CAS token matches the provided CAS token.bool Success
createTables()
Create the shard tables on all databases.
IMaintainableDatabase[] $conns
Map of (shard index => DB handle)
DBConnectionError[] $connFailureErrors
Map of (shard index => Exception)
int $purgeLimit
Max expired rows to purge during randomized garbage collection.
makeKeyInternal( $keyspace, $components)
Make a cache key for the given keyspace and components.Subclasses may override this method to apply d...
string[] $serverTags
(server index => tag/host name)
float $lastGarbageCollect
UNIX timestamp.
array[] $serverInfos
(server index => server config)
int $purgePeriod
Average number of writes required to trigger garbage collection.
doDeleteMulti(array $keys, $flags=0)
bool Success
deleteObjectsExpiringBefore( $timestamp, ?callable $progress=null, $limit=INF, ?string $tag=null)
Delete all objects expiring before a certain date.bool Success; false if unimplemented
doAdd( $key, $value, $exptime=0, $flags=0)
Insert an item if it does not already exist.bool Success
doDelete( $key, $flags=0)
Delete an item.bool True if the item was deleted or not found, false on failure
doSet( $key, $value, $exptime=0, $flags=0)
Set an item.bool Success
doGetMulti(array $keys, $flags=0)
Get an associative array containing the item for each of the keys that have items....
doChangeTTLMulti(array $keys, $exptime, $flags=0)
bool Success
doUnlock( $key)
MediumSpecificBagOStuff::unlock()bool Success
A collection of static methods to play with arrays.
string $keyspace
Default keyspace; used by makeKey()
Definition BagOStuff.php:84
makeFallbackKey(string $key, int $maxLength)
Re-format a cache key that is too long.
const ATTR_DURABILITY
Key in getQoS() for durability of storage writes.
const QOS_DURABILITY_RDBMS
Storage survives on disk with high availability (SqlBagOStuff).
Helper classs that implements most of BagOStuff for a backend.
unlock( $key)
Release an advisory lock on a key string.
getSerialized( $value, $key)
Get the serialized form a value, logging a warning if it involves custom classes.
lock( $key, $timeout=6, $exptime=6, $rclass='')
isInteger( $value)
Check if a value is an integer.
const PASS_BY_REF
Idiom for doGet() to return extra information by reference.
getExpirationAsTimestamp( $exptime)
Convert an optionally relative timestamp to an absolute time.
Database error base class.
Definition DBError.php:22
Raw SQL value to be used in query builders.
Build SELECT queries with a fluent interface.
Container for accessing information about the database servers in a database cluster.
return[ 'config-schema-inverse'=>['default'=>['ConfigRegistry'=>['main'=> 'MediaWiki\\Config\\GlobalVarConfig::newInstance',], 'Sitename'=> 'MediaWiki', 'Server'=> false, 'CanonicalServer'=> false, 'ServerName'=> false, 'AssumeProxiesUseDefaultProtocolPorts'=> true, 'HttpsPort'=> 443, 'ForceHTTPS'=> false, 'ScriptPath'=> '/wiki', 'UsePathInfo'=> null, 'Script'=> false, 'LoadScript'=> false, 'RestPath'=> false, 'StylePath'=> false, 'LocalStylePath'=> false, 'ExtensionAssetsPath'=> false, 'ExtensionDirectory'=> null, 'StyleDirectory'=> null, 'ArticlePath'=> false, 'UploadPath'=> false, 'ImgAuthPath'=> false, 'ThumbPath'=> false, 'UploadDirectory'=> false, 'FileCacheDirectory'=> false, 'Logo'=> false, 'Logos'=> false, 'Favicon'=> '/favicon.ico', 'AppleTouchIcon'=> false, 'ReferrerPolicy'=> false, 'TmpDirectory'=> false, 'UploadBaseUrl'=> '', 'UploadStashScalerBaseUrl'=> false, 'ActionPaths'=>[], 'MainPageIsDomainRoot'=> false, 'EnableUploads'=> false, 'UploadStashMaxAge'=> 21600, 'EnableAsyncUploads'=> false, 'EnableAsyncUploadsByURL'=> false, 'UploadMaintenance'=> false, 'IllegalFileChars'=> ':\\/\\\\', 'DeletedDirectory'=> false, 'ImgAuthDetails'=> false, 'ImgAuthUrlPathMap'=>[], 'LocalFileRepo'=>['class'=> 'MediaWiki\\FileRepo\\LocalRepo', 'name'=> 'local', 'directory'=> null, 'scriptDirUrl'=> null, 'favicon'=> null, 'url'=> null, 'hashLevels'=> null, 'thumbScriptUrl'=> null, 'transformVia404'=> null, 'deletedDir'=> null, 'deletedHashLevels'=> null, 'updateCompatibleMetadata'=> null, 'reserializeMetadata'=> null,], 'ForeignFileRepos'=>[], 'UseInstantCommons'=> false, 'UseSharedUploads'=> false, 'SharedUploadDirectory'=> null, 'SharedUploadPath'=> null, 'HashedSharedUploadDirectory'=> true, 'RepositoryBaseUrl'=> 'https:'FetchCommonsDescriptions'=> false, 'SharedUploadDBname'=> false, 'SharedUploadDBprefix'=> '', 'CacheSharedUploads'=> true, 'ForeignUploadTargets'=>['local',], 'UploadDialog'=>['fields'=>['description'=> true, 'date'=> false, 'categories'=> false,], 'licensemessages'=>['local'=> 'generic-local', 'foreign'=> 'generic-foreign',], 'comment'=>['local'=> '', 'foreign'=> '',], 'format'=>['filepage'=> ' $DESCRIPTION', 'description'=> ' $TEXT', 'ownwork'=> '', 'license'=> '', 'uncategorized'=> '',],], 'FileBackends'=>[], 'LockManagers'=>[], 'ShowEXIF'=> null, 'UpdateCompatibleMetadata'=> false, 'AllowCopyUploads'=> false, 'CopyUploadsDomains'=>[], 'CopyUploadsFromSpecialUpload'=> false, 'CopyUploadProxy'=> false, 'CopyUploadTimeout'=> false, 'CopyUploadAllowOnWikiDomainConfig'=> false, 'MaxUploadSize'=> 104857600, 'MinUploadChunkSize'=> 1024, 'UploadNavigationUrl'=> false, 'UploadMissingFileUrl'=> false, 'ThumbnailScriptPath'=> false, 'SharedThumbnailScriptPath'=> false, 'HashedUploadDirectory'=> true, 'CSPUploadEntryPoint'=> true, 'FileExtensions'=>['png', 'gif', 'jpg', 'jpeg', 'webp',], 'ProhibitedFileExtensions'=>['html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht', 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar', 'shtml', 'jhtml', 'pl', 'py', 'cgi', 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl', 'xml',], 'MimeTypeExclusions'=>['text/html', 'application/javascript', 'text/javascript', 'text/x-javascript', 'application/x-shellscript', 'application/x-php', 'text/x-php', 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh', 'text/scriptlet', 'application/x-msdownload', 'application/x-msmetafile', 'application/java', 'application/xml', 'text/xml',], 'CheckFileExtensions'=> true, 'StrictFileExtensions'=> true, 'DisableUploadScriptChecks'=> false, 'UploadSizeWarning'=> false, 'TrustedMediaFormats'=>['BITMAP', 'AUDIO', 'VIDEO', 'image/svg+xml', 'application/pdf',], 'MediaHandlers'=>[], 'NativeImageLazyLoading'=> false, 'ParserTestMediaHandlers'=>['image/jpeg'=> 'MockBitmapHandler', 'image/png'=> 'MockBitmapHandler', 'image/gif'=> 'MockBitmapHandler', 'image/tiff'=> 'MockBitmapHandler', 'image/webp'=> 'MockBitmapHandler', 'image/x-ms-bmp'=> 'MockBitmapHandler', 'image/x-bmp'=> 'MockBitmapHandler', 'image/x-xcf'=> 'MockBitmapHandler', 'image/svg+xml'=> 'MockSvgHandler', 'image/vnd.djvu'=> 'MockDjVuHandler',], 'UseImageResize'=> true, 'UseImageMagick'=> false, 'ImageMagickConvertCommand'=> '/usr/bin/convert', 'MaxInterlacingAreas'=>[], 'SharpenParameter'=> '0x0.4', 'SharpenReductionThreshold'=> 0.85, 'ImageMagickTempDir'=> false, 'CustomConvertCommand'=> false, 'JpegTran'=> '/usr/bin/jpegtran', 'JpegPixelFormat'=> 'yuv420', 'JpegQuality'=> 80, 'Exiv2Command'=> '/usr/bin/exiv2', 'Exiftool'=> '/usr/bin/exiftool', 'SVGConverters'=>['ImageMagick'=> ' $path/convert -background "#ffffff00" -thumbnail $widthx$height\\! $input PNG:$output', 'inkscape'=> ' $path/inkscape -w $width -o $output $input', 'batik'=> 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input', 'rsvg'=> ' $path/rsvg-convert -w $width -h $height -o $output $input', 'ImagickExt'=>['SvgHandler::rasterizeImagickExt',],], 'SVGConverter'=> 'ImageMagick', 'SVGConverterPath'=> '', 'SVGMaxSize'=> 5120, 'SVGMetadataCutoff'=> 5242880, 'SVGNativeRendering'=> true, 'SVGNativeRenderingSizeLimit'=> 51200, 'MediaInTargetLanguage'=> true, 'MaxImageArea'=> 12500000, 'MaxAnimatedGifArea'=> 12500000, 'TiffThumbnailType'=>[], 'ThumbnailEpoch'=> '20030516000000', 'AttemptFailureEpoch'=> 1, 'IgnoreImageErrors'=> false, 'GenerateThumbnailOnParse'=> true, 'ShowArchiveThumbnails'=> true, 'EnableAutoRotation'=> null, 'Antivirus'=> null, 'AntivirusSetup'=>['clamav'=>['command'=> 'clamscan --no-summary ', 'codemap'=>[0=> 0, 1=> 1, 52=> -1, ' *'=> false,], 'messagepattern'=> '/.*?:(.*)/sim',],], 'AntivirusRequired'=> true, 'VerifyMimeType'=> true, 'MimeTypeFile'=> 'internal', 'MimeInfoFile'=> 'internal', 'MimeDetectorCommand'=> null, 'TrivialMimeDetection'=> false, 'XMLMimeTypes'=>['http:'svg'=> 'image/svg+xml', 'http:'http:'html'=> 'text/html',], 'ImageLimits'=>[[320, 240,], [640, 480,], [800, 600,], [1024, 768,], [1280, 1024,], [2560, 2048,],], 'ThumbLimits'=>[120, 150, 180, 200, 220, 250, 300, 400,], 'ThumbnailNamespaces'=>[6,], 'ThumbnailSteps'=> null, 'ThumbnailStepsRatio'=> null, 'ThumbnailBuckets'=> null, 'ThumbnailMinimumBucketDistance'=> 50, 'UploadThumbnailRenderMap'=>[], 'UploadThumbnailRenderMethod'=> 'jobqueue', 'UploadThumbnailRenderHttpCustomHost'=> false, 'UploadThumbnailRenderHttpCustomDomain'=> false, 'UseTinyRGBForJPGThumbnails'=> false, 'GalleryOptions'=>[], 'ThumbUpright'=> 0.75, 'DirectoryMode'=> 511, 'ResponsiveImages'=> true, 'ImagePreconnect'=> false, 'TrackMediaRequestProvenance'=> false, 'DjvuUseBoxedCommand'=> false, 'DjvuDump'=> null, 'DjvuRenderer'=> null, 'DjvuTxt'=> null, 'DjvuPostProcessor'=> 'pnmtojpeg', 'DjvuOutputExtension'=> 'jpg', 'EmergencyContact'=> false, 'PasswordSender'=> false, 'NoReplyAddress'=> false, 'EnableEmail'=> true, 'EnableUserEmail'=> true, 'UserEmailUseReplyTo'=> true, 'PasswordReminderResendTime'=> 24, 'NewPasswordExpiry'=> 604800, 'UserEmailConfirmationTokenExpiry'=> 604800, 'PasswordExpirationDays'=> false, 'PasswordExpireGrace'=> 604800, 'SMTP'=> false, 'AdditionalMailParams'=> null, 'AllowHTMLEmail'=> false, 'EnotifFromEditor'=> false, 'EmailAuthentication'=> true, 'EmailConfirmationBanner'=> false, 'EnotifWatchlist'=> false, 'EnotifUserTalk'=> false, 'EnotifRevealEditorAddress'=> false, 'EnotifMinorEdits'=> true, 'EnotifUseRealName'=> false, 'UsersNotifiedOnAllChanges'=>[], 'DBname'=> 'my_wiki', 'DBmwschema'=> null, 'DBprefix'=> '', 'DBserver'=> 'localhost', 'DBport'=> 5432, 'DBuser'=> 'wikiuser', 'DBpassword'=> '', 'DBtype'=> 'mysql', 'DBssl'=> false, 'DBcompress'=> false, 'DBStrictWarnings'=> false, 'DBadminuser'=> null, 'DBadminpassword'=> null, 'SearchType'=> null, 'SearchTypeAlternatives'=> null, 'DBTableOptions'=> 'ENGINE=InnoDB, DEFAULT CHARSET=binary', 'SQLMode'=> '', 'SQLiteDataDir'=> '', 'SharedDB'=> null, 'SharedPrefix'=> false, 'SharedTables'=>['user', 'user_properties', 'user_autocreate_serial',], 'SharedSchema'=> false, 'DBservers'=> false, 'LBFactoryConf'=>['class'=> 'Wikimedia\\Rdbms\\LBFactorySimple',], 'DataCenterUpdateStickTTL'=> 10, 'DBerrorLog'=> false, 'DBerrorLogTZ'=> false, 'LocalDatabases'=>[], 'DatabaseReplicaLagWarning'=> 10, 'DatabaseReplicaLagCritical'=> 30, 'MaxExecutionTimeForExpensiveQueries'=> 0, 'VirtualDomainsMapping'=>[], 'FileSchemaMigrationStage'=> 3, 'ExternalLinksDomainGaps'=>[], 'ContentHandlers'=>['wikitext'=>['class'=> 'MediaWiki\\Content\\WikitextContentHandler', 'services'=>['TitleFactory', 'ParserFactory', 'GlobalIdGenerator', 'LanguageNameUtils', 'LinkRenderer', 'MagicWordFactory', 'ParsoidParserFactory',],], 'javascript'=>['class'=> 'MediaWiki\\Content\\JavaScriptContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup',],], 'json'=>['class'=> 'MediaWiki\\Content\\JsonContentHandler', 'services'=>['ParsoidParserFactory', 'TitleFactory',],], 'css'=>['class'=> 'MediaWiki\\Content\\CssContentHandler', 'services'=>['MainConfig', 'ParserFactory', 'UserOptionsLookup',],], 'vue'=>['class'=> 'MediaWiki\\Content\\VueContentHandler', 'services'=>['MainConfig', 'ParserFactory',],], 'text'=> 'MediaWiki\\Content\\TextContentHandler', 'unknown'=> 'MediaWiki\\Content\\FallbackContentHandler',], 'NamespaceContentModels'=>[], 'TextModelsToParse'=>['wikitext', 'javascript', 'css',], 'CompressRevisions'=> false, 'ExternalStores'=>[], 'ExternalServers'=>[], 'DefaultExternalStore'=> false, 'RevisionCacheExpiry'=> 604800, 'PageLanguageUseDB'=> false, 'DiffEngine'=> null, 'ExternalDiffEngine'=> false, 'Wikidiff2Options'=>[], 'RequestTimeLimit'=> null, 'TransactionalTimeLimit'=> 120, 'CriticalSectionTimeLimit'=> 180.0, 'MiserMode'=> false, 'DisableQueryPages'=> false, 'QueryCacheLimit'=> 1000, 'WantedPagesThreshold'=> 1, 'AllowSlowParserFunctions'=> false, 'AllowSchemaUpdates'=> true, 'MaxArticleSize'=> 2048, 'MemoryLimit'=> '50M', 'PoolCounterConf'=> null, 'PoolCountClientConf'=>['servers'=>['127.0.0.1',], 'timeout'=> 0.1,], 'MaxUserDBWriteDuration'=> false, 'MaxJobDBWriteDuration'=> false, 'LinkHolderBatchSize'=> 1000, 'MaximumMovedPages'=> 100, 'ForceDeferredUpdatesPreSend'=> false, 'MultiShardSiteStats'=> false, 'CacheDirectory'=> false, 'MainCacheType'=> 0, 'MessageCacheType'=> -1, 'ParserCacheType'=> -1, 'SessionCacheType'=> -1, 'AnonSessionCacheType'=> false, 'LanguageConverterCacheType'=> -1, 'ObjectCaches'=>[0=>['class'=> 'Wikimedia\\ObjectCache\\EmptyBagOStuff', 'reportDupes'=> false,], 1=>['class'=> 'MediaWiki\\ObjectCache\\SqlBagOStuff', 'loggroup'=> 'SQLBagOStuff',], 'memcached-php'=>['class'=> 'Wikimedia\\ObjectCache\\MemcachedPhpBagOStuff', 'loggroup'=> 'memcached',], 'memcached-pecl'=>['class'=> 'Wikimedia\\ObjectCache\\MemcachedPeclBagOStuff', 'loggroup'=> 'memcached',], 'hash'=>['class'=> 'Wikimedia\\ObjectCache\\HashBagOStuff', 'reportDupes'=> false,], 'apc'=>['class'=> 'Wikimedia\\ObjectCache\\APCUBagOStuff', 'reportDupes'=> false,], 'apcu'=>['class'=> 'Wikimedia\\ObjectCache\\APCUBagOStuff', 'reportDupes'=> false,],], 'WANObjectCache'=>[], 'MicroStashType'=> -1, 'MainStash'=> 1, 'ParsoidCacheConfig'=>['StashType'=> null, 'StashDuration'=> 86400, 'WarmParsoidParserCache'=> false,], 'ParsoidSelectiveUpdateSampleRate'=> 0, 'ParserCacheFilterConfig'=>['pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-pcache'=>['default'=>['minCpuTime'=> 9223372036854775807,],], 'parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],], 'postproc-parsoid-pcache'=>['default'=>['minCpuTime'=> 0,],],], 'ChronologyProtectorSecret'=> '', 'ParserCacheExpireTime'=> 86400, 'ParserCacheAsyncExpireTime'=> 60, 'ParserCacheAsyncRefreshJobs'=> true, 'OldRevisionParserCacheExpireTime'=> 3600, 'ObjectCacheSessionExpiry'=> 3600, 'PHPSessionHandling'=> 'warn', 'SuspiciousIpExpiry'=> false, 'SessionPbkdf2Iterations'=> 10001, 'UseSessionCookieJwt'=> false, 'JwtSessionCookieIssuer'=> null, 'MemCachedServers'=>['127.0.0.1:11211',], 'MemCachedPersistent'=> false, 'MemCachedTimeout'=> 500000, 'UseLocalMessageCache'=> false, 'AdaptiveMessageCache'=> false, 'LocalisationCacheConf'=>['class'=> 'MediaWiki\\Language\\LocalisationCache', 'store'=> 'detect', 'storeClass'=> false, 'storeDirectory'=> false, 'storeServer'=>[], 'forceRecache'=> false, 'manualRecache'=> false,], 'CachePages'=> true, 'CacheEpoch'=> '20030516000000', 'GitInfoCacheDirectory'=> false, 'UseFileCache'=> false, 'FileCacheDepth'=> 2, 'RenderHashAppend'=> '', 'EnableSidebarCache'=> false, 'SidebarCacheExpiry'=> 86400, 'UseGzip'=> false, 'InvalidateCacheOnLocalSettingsChange'=> true, 'ExtensionInfoMTime'=> false, 'EnableRemoteBagOStuffTests'=> false, 'UseCdn'=> false, 'VaryOnXFP'=> false, 'InternalServer'=> false, 'CdnMaxAge'=> 18000, 'CdnMaxageLagged'=> 30, 'CdnMaxageStale'=> 10, 'CdnReboundPurgeDelay'=> 0, 'CdnMaxageSubstitute'=> 60, 'ForcedRawSMaxage'=> 300, 'CdnServers'=>[], 'CdnServersNoPurge'=>[], 'HTCPRouting'=>[], 'HTCPMulticastTTL'=> 1, 'UsePrivateIPs'=> false, 'CdnMatchParameterOrder'=> true, 'LanguageCode'=> 'en', 'GrammarForms'=>[], 'InterwikiMagic'=> true, 'HideInterlanguageLinks'=> false, 'ExtraInterlanguageLinkPrefixes'=>[], 'InterlanguageLinkCodeMap'=>[], 'ExtraLanguageNames'=>[], 'ExtraLanguageCodes'=>['bh'=> 'bho', 'no'=> 'nb', 'simple'=> 'en',], 'DummyLanguageCodes'=>[], 'AllUnicodeFixes'=> false, 'LegacyEncoding'=> false, 'AmericanDates'=> false, 'TranslateNumerals'=> true, 'UseDatabaseMessages'=> true, 'MaxMsgCacheEntrySize'=> 10000, 'DisableLangConversion'=> false, 'DisableTitleConversion'=> false, 'DefaultLanguageVariant'=> false, 'UsePigLatinVariant'=> false, 'DisabledVariants'=>[], 'VariantArticlePath'=> false, 'UseXssLanguage'=> false, 'LoginLanguageSelector'=> false, 'ForceUIMsgAsContentMsg'=>[], 'RawHtmlMessages'=>[], 'Localtimezone'=> null, 'LocalTZoffset'=> null, 'OverrideUcfirstCharacters'=>[], 'MimeType'=> 'text/html', 'Html5Version'=> null, 'EditSubmitButtonLabelPublish'=> false, 'XhtmlNamespaces'=>[], 'SiteNotice'=> '', 'BrowserFormatDetection'=> 'telephone=no', 'SkinMetaTags'=>[], 'DefaultSkin'=> 'vector-2022', 'FallbackSkin'=> 'fallback', 'SkipSkins'=>[], 'DisableOutputCompression'=> false, 'FragmentMode'=>['html5', 'legacy',], 'ExternalInterwikiFragmentMode'=> 'legacy', 'FooterIcons'=>['copyright'=>['copyright'=>[],], 'poweredby'=>['mediawiki'=>['src'=> null, 'url'=> 'https:'alt'=> 'Powered by MediaWiki', 'lang'=> 'en',],],], 'UseCombinedLoginLink'=> false, 'Edititis'=> false, 'Send404Code'=> true, 'ShowRollbackEditCount'=> 10, 'EnableCanonicalServerLink'=> false, 'InterwikiLogoOverride'=>[], 'ResourceModules'=>[], 'ResourceModuleSkinStyles'=>[], 'ResourceLoaderSources'=>[], 'ResourceBasePath'=> null, 'ResourceLoaderMaxage'=>[], 'ResourceLoaderDebug'=> false, 'ResourceLoaderMaxQueryLength'=> false, 'ResourceLoaderValidateJS'=> true, 'ResourceLoaderEnableJSProfiler'=> false, 'ResourceLoaderStorageEnabled'=> true, 'ResourceLoaderStorageVersion'=> 1, 'ResourceLoaderEnableSourceMapLinks'=> true, 'AllowSiteCSSOnRestrictedPages'=> false, 'VueDevelopmentMode'=> false, 'CodexDevelopmentDir'=> null, 'MetaNamespace'=> false, 'MetaNamespaceTalk'=> false, 'CanonicalNamespaceNames'=>[-2=> 'Media', -1=> 'Special', 0=> '', 1=> 'Talk', 2=> 'User', 3=> 'User_talk', 4=> 'Project', 5=> 'Project_talk', 6=> 'File', 7=> 'File_talk', 8=> 'MediaWiki', 9=> 'MediaWiki_talk', 10=> 'Template', 11=> 'Template_talk', 12=> 'Help', 13=> 'Help_talk', 14=> 'Category', 15=> 'Category_talk',], 'ExtraNamespaces'=>[], 'ExtraGenderNamespaces'=>[], 'NamespaceAliases'=>[], 'LegalTitleChars'=> ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+', 'CapitalLinks' => true, 'CapitalLinkOverrides' => [ ], 'NamespacesWithSubpages' => [ 1 => true, 2 => true, 3 => true, 4 => true, 5 => true, 7 => true, 8 => true, 9 => true, 10 => true, 11 => true, 12 => true, 13 => true, 15 => true, ], 'ContentNamespaces' => [ 0, ], 'ShortPagesNamespaceExclusions' => [ ], 'ExtraSignatureNamespaces' => [ ], 'InvalidRedirectTargets' => [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect', 'Mylog', ], 'DisableHardRedirects' => false, 'FixDoubleRedirects' => false, 'LocalInterwikis' => [ ], 'InterwikiExpiry' => 10800, 'InterwikiCache' => false, 'InterwikiScopes' => 3, 'InterwikiFallbackSite' => 'wiki', 'RedirectSources' => false, 'SiteTypes' => [ 'mediawiki' => 'MediaWiki\\Site\\MediaWikiSite', ], 'MaxTocLevel' => 999, 'MaxPPNodeCount' => 1000000, 'MaxTemplateDepth' => 100, 'MaxPPExpandDepth' => 100, 'UrlProtocols' => [ 'bitcoin:', 'ftp: 'ftps: 'geo:', 'git: 'gopher: 'http: 'https: 'irc: 'ircs: 'magnet:', 'mailto:', 'matrix:', 'mms: 'news:', 'nntp: 'redis: 'sftp: 'sip:', 'sips:', 'sms:', 'ssh: 'svn: 'tel:', 'telnet: 'urn:', 'wikipedia: 'worldwind: 'xmpp:', ' ], 'CleanSignatures' => true, 'AllowExternalImages' => false, 'AllowExternalImagesFrom' => '', 'EnableImageWhitelist' => false, 'TidyConfig' => [ ], 'ParsoidSettings' => [ 'useSelser' => true, ], 'ParsoidExperimentalParserFunctionOutput' => false, 'UseLegacyMediaStyles' => false, 'RawHtml' => false, 'ExternalLinkTarget' => false, 'NoFollowLinks' => true, 'NoFollowNsExceptions' => [ ], 'NoFollowDomainExceptions' => [ 'mediawiki.org', ], 'RegisterInternalExternals' => false, 'ExternalLinksIgnoreDomains' => [ ], 'AllowDisplayTitle' => true, 'RestrictDisplayTitle' => true, 'ExpensiveParserFunctionLimit' => 100, 'PreprocessorCacheThreshold' => 1000, 'EnableScaryTranscluding' => false, 'TranscludeCacheExpiry' => 3600, 'EnableMagicLinks' => [ 'ISBN' => false, 'PMID' => false, 'RFC' => false, ], 'ParserEnableUserLanguage' => false, 'ArticleCountMethod' => 'link', 'ActiveUserDays' => 30, 'LearnerEdits' => 10, 'LearnerMemberSince' => 4, 'ExperiencedUserEdits' => 500, 'ExperiencedUserMemberSince' => 30, 'ManualRevertSearchRadius' => 15, 'RevertedTagMaxDepth' => 15, 'CentralIdLookupProviders' => [ 'local' => [ 'class' => 'MediaWiki\\User\\CentralId\\LocalIdLookup', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', 'HideUserUtils', ], ], ], 'CentralIdLookupProvider' => 'local', 'UserRegistrationProviders' => [ 'local' => [ 'class' => 'MediaWiki\\User\\Registration\\LocalUserRegistrationProvider', 'services' => [ 'ConnectionProvider', ], ], ], 'PasswordPolicy' => [ 'policies' => [ 'bureaucrat' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'sysop' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'interface-admin' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'bot' => [ 'MinimalPasswordLength' => 10, 'MinimumPasswordLengthToLogin' => 1, ], 'default' => [ 'MinimalPasswordLength' => [ 'value' => 8, 'suggestChangeOnLogin' => true, ], 'PasswordCannotBeSubstringInUsername' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], 'PasswordCannotMatchDefaults' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], 'MaximalPasswordLength' => [ 'value' => 4096, 'suggestChangeOnLogin' => true, ], 'PasswordNotInCommonList' => [ 'value' => true, 'suggestChangeOnLogin' => true, ], ], ], 'checks' => [ 'MinimalPasswordLength' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMinimalPasswordLength', ], 'MinimumPasswordLengthToLogin' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMinimumPasswordLengthToLogin', ], 'PasswordCannotBeSubstringInUsername' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordCannotBeSubstringInUsername', ], 'PasswordCannotMatchDefaults' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordCannotMatchDefaults', ], 'MaximalPasswordLength' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkMaximalPasswordLength', ], 'PasswordNotInCommonList' => [ 'MediaWiki\\Password\\PasswordPolicyChecks', 'checkPasswordNotInCommonList', ], ], ], 'AuthManagerConfig' => null, 'AuthManagerAutoConfig' => [ 'preauth' => [ 'MediaWiki\\Auth\\ThrottlePreAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\ThrottlePreAuthenticationProvider', 'sort' => 0, ], ], 'primaryauth' => [ 'MediaWiki\\Auth\\TemporaryPasswordPrimaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\TemporaryPasswordPrimaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', 'UserOptionsLookup', ], 'args' => [ [ 'authoritative' => false, ], ], 'sort' => 0, ], 'MediaWiki\\Auth\\LocalPasswordPrimaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\LocalPasswordPrimaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', ], 'args' => [ [ 'authoritative' => true, ], ], 'sort' => 100, ], ], 'secondaryauth' => [ 'MediaWiki\\Auth\\CheckBlocksSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\CheckBlocksSecondaryAuthenticationProvider', 'sort' => 0, ], 'MediaWiki\\Auth\\ResetPasswordSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\ResetPasswordSecondaryAuthenticationProvider', 'sort' => 100, ], 'MediaWiki\\Auth\\EmailNotificationSecondaryAuthenticationProvider' => [ 'class' => 'MediaWiki\\Auth\\EmailNotificationSecondaryAuthenticationProvider', 'services' => [ 'DBLoadBalancerFactory', ], 'sort' => 200, ], ], ], 'RememberMe' => 'choose', 'ReauthenticateTime' => [ 'default' => 3600, ], 'AllowSecuritySensitiveOperationIfCannotReauthenticate' => [ 'default' => true, ], 'ChangeCredentialsBlacklist' => [ 'MediaWiki\\Auth\\TemporaryPasswordAuthenticationRequest', ], 'RemoveCredentialsBlacklist' => [ 'MediaWiki\\Auth\\PasswordAuthenticationRequest', ], 'InvalidPasswordReset' => true, 'PasswordDefault' => 'pbkdf2', 'PasswordConfig' => [ 'A' => [ 'class' => 'MediaWiki\\Password\\MWOldPassword', ], 'B' => [ 'class' => 'MediaWiki\\Password\\MWSaltedPassword', ], 'pbkdf2-legacyA' => [ 'class' => 'MediaWiki\\Password\\LayeredParameterizedPassword', 'types' => [ 'A', 'pbkdf2', ], ], 'pbkdf2-legacyB' => [ 'class' => 'MediaWiki\\Password\\LayeredParameterizedPassword', 'types' => [ 'B', 'pbkdf2', ], ], 'bcrypt' => [ 'class' => 'MediaWiki\\Password\\BcryptPassword', 'cost' => 9, ], 'pbkdf2' => [ 'class' => 'MediaWiki\\Password\\Pbkdf2PasswordUsingOpenSSL', 'algo' => 'sha512', 'cost' => '30000', 'length' => '64', ], 'argon2' => [ 'class' => 'MediaWiki\\Password\\Argon2Password', 'algo' => 'auto', ], ], 'PasswordResetRoutes' => [ 'username' => true, 'email' => true, ], 'MaxSigChars' => 255, 'SignatureValidation' => 'warning', 'SignatureAllowedLintErrors' => [ 'obsolete-tag', ], 'MaxNameChars' => 255, 'ReservedUsernames' => [ 'MediaWiki default', 'Conversion script', 'Maintenance script', 'Template namespace initialisation script', 'ScriptImporter', 'Delete page script', 'Move page script', 'Command line script', 'Unknown user', 'msg:double-redirect-fixer', 'msg:usermessage-editor', 'msg:proxyblocker', 'msg:sorbs', 'msg:spambot_username', 'msg:autochange-username', ], 'DefaultUserOptions' => [ 'ccmeonemails' => 0, 'date' => 'default', 'diffonly' => 0, 'diff-type' => 'table', 'disablemail' => 0, 'editfont' => 'monospace', 'editondblclick' => 0, 'editrecovery' => 0, 'editsectiononrightclick' => 0, 'email-allow-new-users' => 1, 'enotifminoredits' => 0, 'enotifrevealaddr' => 0, 'enotifusertalkpages' => 1, 'enotifwatchlistpages' => 1, 'extendwatchlist' => 1, 'fancysig' => 0, 'forceeditsummary' => 0, 'forcesafemode' => 0, 'gender' => 'unknown', 'hidecategorization' => 1, 'hideminor' => 0, 'hidepatrolled' => 0, 'imagesize' => 2, 'minordefault' => 0, 'newpageshidepatrolled' => 0, 'nickname' => '', 'norollbackdiff' => 0, 'prefershttps' => 1, 'previewonfirst' => 0, 'previewontop' => 1, 'pst-cssjs' => 1, 'rcdays' => 7, 'rcenhancedfilters-disable' => 0, 'rclimit' => 50, 'requireemail' => 0, 'search-match-redirect' => true, 'search-special-page' => 'Search', 'search-thumbnail-extra-namespaces' => true, 'searchlimit' => 20, 'showhiddencats' => 0, 'shownumberswatching' => 1, 'showrollbackconfirmation' => 0, 'skin' => false, 'skin-responsive' => 1, 'thumbsize' => 5, 'underline' => 2, 'useeditwarning' => 1, 'uselivepreview' => 0, 'usenewrc' => 1, 'watchcreations' => 1, 'watchcreations-expiry' => 'infinite', 'watchdefault' => 1, 'watchdefault-expiry' => 'infinite', 'watchdeletion' => 0, 'watchlistdays' => 7, 'watchlisthideanons' => 0, 'watchlisthidebots' => 0, 'watchlisthidecategorization' => 1, 'watchlisthideliu' => 0, 'watchlisthideminor' => 0, 'watchlisthideown' => 0, 'watchlisthidepatrolled' => 0, 'watchlistreloadautomatically' => 0, 'watchlistunwatchlinks' => 0, 'watchmoves' => 0, 'watchrollback' => 0, 'watchuploads' => 1, 'watchrollback-expiry' => 'infinite', 'watchstar-expiry' => 'infinite', 'wlenhancedfilters-disable' => 0, 'wllimit' => 250, ], 'ConditionalUserOptions' => [ ], 'HiddenPrefs' => [ ], 'UserJsPrefLimit' => 100, 'InvalidUsernameCharacters' => '@:>=', 'UserrightsInterwikiDelimiter' => '@', 'SecureLogin' => false, 'AuthenticationTokenVersion' => null, 'SessionProviders' => [ 'MediaWiki\\Session\\CookieSessionProvider' => [ 'class' => 'MediaWiki\\Session\\CookieSessionProvider', 'args' => [ [ 'priority' => 30, ], ], 'services' => [ 'JwtCodec', 'UrlUtils', ], ], 'MediaWiki\\Session\\BotPasswordSessionProvider' => [ 'class' => 'MediaWiki\\Session\\BotPasswordSessionProvider', 'args' => [ [ 'priority' => 75, ], ], 'services' => [ 'GrantsInfo', ], ], ], 'AutoCreateTempUser' => [ 'known' => false, 'enabled' => false, 'actions' => [ 'edit', ], 'genPattern' => '~$1', 'matchPattern' => null, 'reservedPattern' => '~$1', 'serialProvider' => [ 'type' => 'local', 'useYear' => true, ], 'serialMapping' => [ 'type' => 'readable-numeric', ], 'expireAfterDays' => 90, 'notifyBeforeExpirationDays' => 10, ], 'AutoblockExemptions' => [ ], 'AutoblockExpiry' => 86400, 'BlockAllowsUTEdit' => true, 'BlockCIDRLimit' => [ 'IPv4' => 16, 'IPv6' => 19, ], 'BlockDisablesLogin' => false, 'EnableMultiBlocks' => false, 'WhitelistRead' => false, 'WhitelistReadRegexp' => false, 'EmailConfirmToEdit' => false, 'HideIdentifiableRedirects' => true, 'GroupPermissions' => [ '*' => [ 'createaccount' => true, 'read' => true, 'edit' => true, 'createpage' => true, 'createtalk' => true, 'viewmyprivateinfo' => true, 'editmyprivateinfo' => true, 'editmyoptions' => true, ], 'user' => [ 'move' => true, 'move-subpages' => true, 'move-rootuserpages' => true, 'move-categorypages' => true, 'movefile' => true, 'read' => true, 'edit' => true, 'createpage' => true, 'createtalk' => true, 'upload' => true, 'reupload' => true, 'reupload-shared' => true, 'minoredit' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, 'editmyuserjsredirect' => true, 'sendemail' => true, 'applychangetags' => true, 'changetags' => true, 'viewmywatchlist' => true, 'editmywatchlist' => true, 'createwithcontentmodel' => true, ], 'autoconfirmed' => [ 'autoconfirmed' => true, 'editsemiprotected' => true, ], 'bot' => [ 'bot' => true, 'autoconfirmed' => true, 'editsemiprotected' => true, 'nominornewtalk' => true, 'autopatrol' => true, 'suppressredirect' => true, 'apihighlimits' => true, ], 'sysop' => [ 'block' => true, 'createaccount' => true, 'delete' => true, 'bigdelete' => true, 'deletedhistory' => true, 'deletedtext' => true, 'undelete' => true, 'editcontentmodel' => true, 'editinterface' => true, 'editsitejson' => true, 'edituserjson' => true, 'import' => true, 'importupload' => true, 'move' => true, 'move-subpages' => true, 'move-rootuserpages' => true, 'move-categorypages' => true, 'patrol' => true, 'autopatrol' => true, 'protect' => true, 'editprotected' => true, 'rollback' => true, 'upload' => true, 'reupload' => true, 'reupload-shared' => true, 'unwatchedpages' => true, 'autoconfirmed' => true, 'editsemiprotected' => true, 'ipblock-exempt' => true, 'blockemail' => true, 'markbotedits' => true, 'apihighlimits' => true, 'browsearchive' => true, 'noratelimit' => true, 'movefile' => true, 'unblockself' => true, 'suppressredirect' => true, 'mergehistory' => true, 'managechangetags' => true, 'deletechangetags' => true, ], 'interface-admin' => [ 'editinterface' => true, 'editsitecss' => true, 'editsitejson' => true, 'editsitejs' => true, 'editusercss' => true, 'edituserjson' => true, 'edituserjs' => true, ], 'bureaucrat' => [ 'userrights' => true, 'noratelimit' => true, 'renameuser' => true, ], 'suppress' => [ 'hideuser' => true, 'suppressrevision' => true, 'viewsuppressed' => true, 'suppressionlog' => true, 'deleterevision' => true, 'deletelogentry' => true, ], ], 'PrivilegedGroups' => [ 'bureaucrat', 'interface-admin', 'suppress', 'sysop', ], 'RevokePermissions' => [ ], 'GroupInheritsPermissions' => [ ], 'ImplicitGroups' => [ '*', 'user', 'autoconfirmed', ], 'GroupsAddToSelf' => [ ], 'GroupsRemoveFromSelf' => [ ], 'RestrictedGroups' => [ ], 'UserRequirementsPrivateConditions' => [ ], 'RestrictionTypes' => [ 'create', 'edit', 'move', 'upload', ], 'RestrictionLevels' => [ '', 'autoconfirmed', 'sysop', ], 'CascadingRestrictionLevels' => [ 'sysop', ], 'SemiprotectedRestrictionLevels' => [ 'autoconfirmed', ], 'NamespaceProtection' => [ ], 'NonincludableNamespaces' => [ ], 'AutoConfirmAge' => 0, 'AutoConfirmCount' => 0, 'Autopromote' => [ 'autoconfirmed' => [ '&', [ 1, null, ], [ 2, null, ], ], ], 'AutopromoteOnce' => [ 'onEdit' => [ ], ], 'AutopromoteOnceLogInRC' => true, 'AutopromoteOnceRCExcludedGroups' => [ ], 'AddGroups' => [ ], 'RemoveGroups' => [ ], 'AvailableRights' => [ ], 'ImplicitRights' => [ ], 'DeleteRevisionsLimit' => 0, 'DeleteRevisionsBatchSize' => 1000, 'HideUserContribLimit' => 1000, 'AccountCreationThrottle' => [ [ 'count' => 0, 'seconds' => 86400, ], ], 'TempAccountCreationThrottle' => [ [ 'count' => 1, 'seconds' => 600, ], [ 'count' => 6, 'seconds' => 86400, ], ], 'TempAccountNameAcquisitionThrottle' => [ [ 'count' => 60, 'seconds' => 86400, ], ], 'SpamRegex' => [ ], 'SummarySpamRegex' => [ ], 'EnableDnsBlacklist' => false, 'DnsBlacklistUrls' => [ ], 'ProxyList' => [ ], 'ProxyWhitelist' => [ ], 'SoftBlockRanges' => [ ], 'ApplyIpBlocksToXff' => false, 'RateLimits' => [ 'edit' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], 'user' => [ 90, 60, ], ], 'move' => [ 'newbie' => [ 2, 120, ], 'user' => [ 8, 60, ], ], 'upload' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], ], 'rollback' => [ 'user' => [ 10, 60, ], 'newbie' => [ 5, 120, ], ], 'mailpassword' => [ 'ip' => [ 5, 3600, ], ], 'sendemail' => [ 'ip' => [ 5, 86400, ], 'newbie' => [ 5, 86400, ], 'user' => [ 20, 86400, ], ], 'changeemail' => [ 'ip-all' => [ 10, 3600, ], 'user' => [ 4, 86400, ], ], 'confirmemail' => [ 'ip-all' => [ 10, 3600, ], 'user' => [ 4, 86400, ], ], 'purge' => [ 'ip' => [ 30, 60, ], 'user' => [ 30, 60, ], ], 'linkpurge' => [ 'ip' => [ 30, 60, ], 'user' => [ 30, 60, ], ], 'renderfile' => [ 'ip' => [ 700, 30, ], 'user' => [ 700, 30, ], ], 'renderfile-nonstandard' => [ 'ip' => [ 70, 30, ], 'user' => [ 70, 30, ], ], 'stashedit' => [ 'ip' => [ 30, 60, ], 'newbie' => [ 30, 60, ], ], 'stashbasehtml' => [ 'ip' => [ 5, 60, ], 'newbie' => [ 5, 60, ], ], 'changetags' => [ 'ip' => [ 8, 60, ], 'newbie' => [ 8, 60, ], ], 'editcontentmodel' => [ 'newbie' => [ 2, 120, ], 'user' => [ 8, 60, ], ], ], 'RateLimitsExcludedIPs' => [ ], 'PutIPinRC' => true, 'QueryPageDefaultLimit' => 50, 'ExternalQuerySources' => [ ], 'PasswordAttemptThrottle' => [ [ 'count' => 5, 'seconds' => 300, ], [ 'count' => 150, 'seconds' => 172800, ], ], 'GrantPermissions' => [ 'basic' => [ 'autocreateaccount' => true, 'autoconfirmed' => true, 'autopatrol' => true, 'editsemiprotected' => true, 'ipblock-exempt' => true, 'nominornewtalk' => true, 'patrolmarks' => true, 'read' => true, 'unwatchedpages' => true, ], 'highvolume' => [ 'bot' => true, 'apihighlimits' => true, 'noratelimit' => true, 'markbotedits' => true, ], 'import' => [ 'import' => true, 'importupload' => true, ], 'editpage' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'pagelang' => true, ], 'editprotected' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editprotected' => true, ], 'editmycssjs' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editmyusercss' => true, 'editmyuserjson' => true, 'editmyuserjs' => true, ], 'editmyoptions' => [ 'editmyoptions' => true, 'editmyuserjson' => true, ], 'editinterface' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, ], 'editsiteconfig' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editinterface' => true, 'edituserjson' => true, 'editsitejson' => true, 'editusercss' => true, 'edituserjs' => true, 'editsitecss' => true, 'editsitejs' => true, ], 'createeditmovepage' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'createpage' => true, 'createtalk' => true, 'delete-redirect' => true, 'move' => true, 'move-rootuserpages' => true, 'move-subpages' => true, 'move-categorypages' => true, 'suppressredirect' => true, ], 'uploadfile' => [ 'upload' => true, 'reupload-own' => true, ], 'uploadeditmovefile' => [ 'upload' => true, 'reupload-own' => true, 'reupload' => true, 'reupload-shared' => true, 'upload_by_url' => true, 'movefile' => true, 'suppressredirect' => true, ], 'patrol' => [ 'patrol' => true, ], 'rollback' => [ 'rollback' => true, ], 'blockusers' => [ 'block' => true, 'blockemail' => true, ], 'viewdeleted' => [ 'browsearchive' => true, 'deletedhistory' => true, 'deletedtext' => true, ], 'viewrestrictedlogs' => [ 'suppressionlog' => true, ], 'delete' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'browsearchive' => true, 'deletedhistory' => true, 'deletedtext' => true, 'delete' => true, 'bigdelete' => true, 'deletelogentry' => true, 'deleterevision' => true, 'undelete' => true, ], 'oversight' => [ 'suppressrevision' => true, 'viewsuppressed' => true, ], 'protect' => [ 'edit' => true, 'minoredit' => true, 'applychangetags' => true, 'changetags' => true, 'editcontentmodel' => true, 'createwithcontentmodel' => true, 'editprotected' => true, 'protect' => true, ], 'viewmywatchlist' => [ 'viewmywatchlist' => true, ], 'editmywatchlist' => [ 'editmywatchlist' => true, ], 'sendemail' => [ 'sendemail' => true, ], 'createaccount' => [ 'createaccount' => true, ], 'privateinfo' => [ 'viewmyprivateinfo' => true, ], 'mergehistory' => [ 'mergehistory' => true, ], ], 'GrantPermissionGroups' => [ 'basic' => 'hidden', 'editpage' => 'page-interaction', 'createeditmovepage' => 'page-interaction', 'editprotected' => 'page-interaction', 'patrol' => 'page-interaction', 'uploadfile' => 'file-interaction', 'uploadeditmovefile' => 'file-interaction', 'sendemail' => 'email', 'viewmywatchlist' => 'watchlist-interaction', 'editviewmywatchlist' => 'watchlist-interaction', 'editmycssjs' => 'customization', 'editmyoptions' => 'customization', 'editinterface' => 'administration', 'editsiteconfig' => 'administration', 'rollback' => 'administration', 'blockusers' => 'administration', 'delete' => 'administration', 'viewdeleted' => 'administration', 'viewrestrictedlogs' => 'administration', 'protect' => 'administration', 'oversight' => 'administration', 'createaccount' => 'administration', 'mergehistory' => 'administration', 'import' => 'administration', 'highvolume' => 'high-volume', 'privateinfo' => 'private-information', ], 'GrantRiskGroups' => [ 'basic' => 'low', 'editpage' => 'low', 'createeditmovepage' => 'low', 'editprotected' => 'vandalism', 'patrol' => 'low', 'uploadfile' => 'low', 'uploadeditmovefile' => 'low', 'sendemail' => 'security', 'viewmywatchlist' => 'low', 'editviewmywatchlist' => 'low', 'editmycssjs' => 'security', 'editmyoptions' => 'security', 'editinterface' => 'vandalism', 'editsiteconfig' => 'security', 'rollback' => 'low', 'blockusers' => 'vandalism', 'delete' => 'vandalism', 'viewdeleted' => 'vandalism', 'viewrestrictedlogs' => 'security', 'protect' => 'vandalism', 'oversight' => 'security', 'createaccount' => 'low', 'mergehistory' => 'vandalism', 'import' => 'security', 'highvolume' => 'low', 'privateinfo' => 'low', ], 'EnableBotPasswords' => true, 'BotPasswordsCluster' => false, 'BotPasswordsDatabase' => false, 'BotPasswordsLimit' => 100, 'SecretKey' => false, 'JwtPrivateKey' => false, 'JwtPublicKey' => false, 'AllowUserJs' => false, 'AllowUserCss' => false, 'AllowUserCssPrefs' => true, 'UseSiteJs' => true, 'UseSiteCss' => true, 'BreakFrames' => false, 'EditPageFrameOptions' => 'DENY', 'ApiFrameOptions' => 'DENY', 'CSPHeader' => false, 'CSPReportOnlyHeader' => false, 'CSPFalsePositiveUrls' => [ 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'https: 'chrome-extension' => true, ], 'AllowCrossOrigin' => false, 'RestAllowCrossOriginCookieAuth' => false, 'SessionSecret' => false, 'CookieExpiration' => 2592000, 'ExtendedLoginCookieExpiration' => 15552000, 'SessionCookieJwtExpiration' => 14400, 'CookieDomain' => '', 'CookiePath' => '/', 'CookieSecure' => 'detect', 'CookiePrefix' => false, 'CookieHttpOnly' => true, 'CookieSameSite' => null, 'CacheVaryCookies' => [ ], 'SessionName' => false, 'CookieSetOnAutoblock' => true, 'CookieSetOnIpBlock' => true, 'DebugLogFile' => '', 'DebugLogPrefix' => '', 'DebugRedirects' => false, 'DebugRawPage' => false, 'DebugComments' => false, 'DebugDumpSql' => false, 'TrxProfilerLimits' => [ 'GET' => [ 'masterConns' => 0, 'writes' => 0, 'readQueryTime' => 5, 'readQueryRows' => 10000, ], 'POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 100000, 'maxAffected' => 1000, ], 'POST-nonwrite' => [ 'writes' => 0, 'readQueryTime' => 5, 'readQueryRows' => 10000, ], 'PostSend-GET' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 10000, 'maxAffected' => 1000, 'masterConns' => 0, 'writes' => 0, ], 'PostSend-POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, 'readQueryRows' => 100000, 'maxAffected' => 1000, ], 'JobRunner' => [ 'readQueryTime' => 30, 'writeQueryTime' => 5, 'readQueryRows' => 100000, 'maxAffected' => 500, ], 'Maintenance' => [ 'writeQueryTime' => 5, 'maxAffected' => 1000, ], ], 'DebugLogGroups' => [ ], 'MWLoggerDefaultSpi' => [ 'class' => 'MediaWiki\\Logger\\LegacySpi', ], 'ShowDebug' => false, 'SpecialVersionShowHooks' => false, 'ShowExceptionDetails' => false, 'LogExceptionBacktrace' => true, 'PropagateErrors' => true, 'ShowHostnames' => false, 'OverrideHostname' => false, 'DevelopmentWarnings' => false, 'DeprecationReleaseLimit' => false, 'Profiler' => [ ], 'StatsdServer' => false, 'StatsdMetricPrefix' => 'MediaWiki', 'StatsTarget' => null, 'StatsFormat' => null, 'StatsPrefix' => 'mediawiki', 'OpenTelemetryConfig' => null, 'PageInfoTransclusionLimit' => 50, 'EnableJavaScriptTest' => false, 'CachePrefix' => false, 'DebugToolbar' => false, 'ApiClientErrorSampleRate' => 1.0, 'DisableTextSearch' => false, 'AdvancedSearchHighlighting' => false, 'SearchHighlightBoundaries' => '[\\p{Z}\\p{P}\\p{C}]', 'OpenSearchTemplates' => [ 'application/x-suggestions+json' => false, 'application/x-suggestions+xml' => false, ], 'OpenSearchDefaultLimit' => 10, 'OpenSearchDescriptionLength' => 100, 'SearchSuggestCacheExpiry' => 1200, 'DisableSearchUpdate' => false, 'NamespacesToBeSearchedDefault' => [ true, ], 'DisableInternalSearch' => false, 'SearchForwardUrl' => null, 'SitemapNamespaces' => false, 'SitemapNamespacesPriorities' => false, 'SitemapApiConfig' => [ ], 'SpecialSearchFormOptions' => [ ], 'SearchMatchRedirectPreference' => false, 'SearchRunSuggestedQuery' => true, 'Diff3' => '/usr/bin/diff3', 'Diff' => '/usr/bin/diff', 'PreviewOnOpenNamespaces' => [ 14 => true, ], 'UniversalEditButton' => true, 'UseAutomaticEditSummaries' => true, 'CommandLineDarkBg' => false, 'ReadOnly' => null, 'ReadOnlyWatchedItemStore' => false, 'ReadOnlyFile' => false, 'UpgradeKey' => false, 'GitBin' => '/usr/bin/git', 'GitRepositoryViewers' => [ 'https: 'ssh: ], 'InstallerInitialPages' => [ [ 'titlemsg' => 'mainpage', 'text' => '{{subst:int:mainpagetext}}{{subst:int:mainpagedocfooter}}', ], ], 'RCMaxAge' => 7776000, 'WatchersMaxAge' => 15552000, 'UnwatchedPageSecret' => 1, 'RCFilterByAge' => false, 'RCLinkLimits' => [ 50, 100, 250, 500, ], 'RCLinkDays' => [ 1, 3, 7, 14, 30, ], 'RCFeeds' => [ ], 'RCWatchCategoryMembership' => false, 'UseRCPatrol' => true, 'StructuredChangeFiltersLiveUpdatePollingRate' => 3, 'UseNPPatrol' => true, 'UseFilePatrol' => true, 'Feed' => true, 'FeedLimit' => 50, 'FeedCacheTimeout' => 60, 'FeedDiffCutoff' => 32768, 'OverrideSiteFeed' => [ ], 'FeedClasses' => [ 'rss' => 'MediaWiki\\Feed\\RSSFeed', 'atom' => 'MediaWiki\\Feed\\AtomFeed', ], 'AdvertisedFeedTypes' => [ 'atom', ], 'RCShowWatchingUsers' => false, 'RCShowChangedSize' => true, 'RCChangedSizeThreshold' => 500, 'ShowUpdatedMarker' => true, 'DisableAnonTalk' => false, 'UseTagFilter' => true, 'SoftwareTags' => [ 'mw-contentmodelchange' => true, 'mw-new-redirect' => true, 'mw-removed-redirect' => true, 'mw-changed-redirect-target' => true, 'mw-blank' => true, 'mw-replace' => true, 'mw-recreated' => true, 'mw-rollback' => true, 'mw-undo' => true, 'mw-manual-revert' => true, 'mw-reverted' => true, 'mw-server-side-upload' => true, 'mw-ipblock-appeal' => true, ], 'UnwatchedPageThreshold' => false, 'RecentChangesFlags' => [ 'newpage' => [ 'letter' => 'newpageletter', 'title' => 'recentchanges-label-newpage', 'legend' => 'recentchanges-legend-newpage', 'grouping' => 'any', ], 'minor' => [ 'letter' => 'minoreditletter', 'title' => 'recentchanges-label-minor', 'legend' => 'recentchanges-legend-minor', 'class' => 'minoredit', 'grouping' => 'all', ], 'bot' => [ 'letter' => 'boteditletter', 'title' => 'recentchanges-label-bot', 'legend' => 'recentchanges-legend-bot', 'class' => 'botedit', 'grouping' => 'all', ], 'unpatrolled' => [ 'letter' => 'unpatrolledletter', 'title' => 'recentchanges-label-unpatrolled', 'legend' => 'recentchanges-legend-unpatrolled', 'grouping' => 'any', ], ], 'WatchlistExpiry' => false, 'EnableWatchlistLabels' => false, 'WatchlistLabelsMaxPerUser' => 100, 'WatchlistPurgeRate' => 0.1, 'WatchlistExpiryMaxDuration' => '1 year', 'EnableChangesListQueryPartitioning' => false, 'RightsPage' => null, 'RightsUrl' => null, 'RightsText' => null, 'RightsIcon' => null, 'UseCopyrightUpload' => false, 'MaxCredits' => 0, 'ShowCreditsIfMax' => true, 'ImportSources' => [ ], 'ImportTargetNamespace' => null, 'ExportAllowHistory' => true, 'ExportMaxHistory' => 0, 'ExportAllowListContributors' => false, 'ExportMaxLinkDepth' => 0, 'ExportFromNamespaces' => false, 'ExportAllowAll' => false, 'ExportPagelistLimit' => 5000, 'XmlDumpSchemaVersion' => '0.11', 'WikiFarmSettingsDirectory' => null, 'WikiFarmSettingsExtension' => 'yaml', 'ExtensionFunctions' => [ ], 'ExtensionMessagesFiles' => [ ], 'MessagesDirs' => [ ], 'TranslationAliasesDirs' => [ ], 'ExtensionEntryPointListFiles' => [ ], 'EnableParserLimitReporting' => true, 'ValidSkinNames' => [ ], 'SpecialPages' => [ ], 'ExtensionCredits' => [ ], 'Hooks' => [ ], 'ServiceWiringFiles' => [ ], 'JobClasses' => [ 'deletePage' => 'MediaWiki\\Page\\DeletePageJob', 'refreshLinks' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'deleteLinks' => 'MediaWiki\\Page\\DeleteLinksJob', 'htmlCacheUpdate' => 'MediaWiki\\JobQueue\\Jobs\\HTMLCacheUpdateJob', 'sendMail' => [ 'class' => 'MediaWiki\\Mail\\EmaillingJob', 'services' => [ 'Emailer', ], ], 'enotifNotify' => [ 'class' => 'MediaWiki\\RecentChanges\\RecentChangeNotifyJob', 'services' => [ 'RecentChangeLookup', ], ], 'fixDoubleRedirect' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\DoubleRedirectJob', 'services' => [ 'RevisionLookup', 'MagicWordFactory', 'WikiPageFactory', ], 'needsPage' => true, ], 'AssembleUploadChunks' => 'MediaWiki\\JobQueue\\Jobs\\AssembleUploadChunksJob', 'PublishStashedFile' => 'MediaWiki\\JobQueue\\Jobs\\PublishStashedFileJob', 'ThumbnailRender' => 'MediaWiki\\JobQueue\\Jobs\\ThumbnailRenderJob', 'UploadFromUrl' => 'MediaWiki\\JobQueue\\Jobs\\UploadFromUrlJob', 'recentChangesUpdate' => 'MediaWiki\\RecentChanges\\RecentChangesUpdateJob', 'refreshLinksPrioritized' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'refreshLinksDynamic' => 'MediaWiki\\JobQueue\\Jobs\\RefreshLinksJob', 'activityUpdateJob' => 'MediaWiki\\Watchlist\\ActivityUpdateJob', 'categoryMembershipChange' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\CategoryMembershipChangeJob', 'services' => [ 'RecentChangeFactory', ], ], 'CategoryCountUpdateJob' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\CategoryCountUpdateJob', 'services' => [ 'ConnectionProvider', 'NamespaceInfo', ], ], 'clearUserWatchlist' => 'MediaWiki\\Watchlist\\ClearUserWatchlistJob', 'watchlistExpiry' => 'MediaWiki\\Watchlist\\WatchlistExpiryJob', 'cdnPurge' => 'MediaWiki\\JobQueue\\Jobs\\CdnPurgeJob', 'userGroupExpiry' => 'MediaWiki\\User\\UserGroupExpiryJob', 'clearWatchlistNotifications' => 'MediaWiki\\Watchlist\\ClearWatchlistNotificationsJob', 'userOptionsUpdate' => 'MediaWiki\\User\\Options\\UserOptionsUpdateJob', 'revertedTagUpdate' => 'MediaWiki\\JobQueue\\Jobs\\RevertedTagUpdateJob', 'null' => 'MediaWiki\\JobQueue\\Jobs\\NullJob', 'userEditCountInit' => 'MediaWiki\\User\\UserEditCountInitJob', 'parsoidCachePrewarm' => [ 'class' => 'MediaWiki\\JobQueue\\Jobs\\ParsoidCachePrewarmJob', 'services' => [ 'ParserOutputAccess', 'PageStore', 'RevisionLookup', 'ParsoidSiteConfig', ], 'needsPage' => false, ], 'renameUserTable' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserTableJob', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', ], ], 'renameUserDerived' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserDerivedJob', 'services' => [ 'RenameUserFactory', 'UserFactory', ], ], 'renameUser' => [ 'class' => 'MediaWiki\\RenameUser\\Job\\RenameUserTableJob', 'services' => [ 'MainConfig', 'DBLoadBalancerFactory', ], ], ], 'JobTypesExcludedFromDefaultQueue' => [ 'AssembleUploadChunks', 'PublishStashedFile', 'UploadFromUrl', ], 'JobBackoffThrottling' => [ ], 'JobTypeConf' => [ 'default' => [ 'class' => 'MediaWiki\\JobQueue\\JobQueueDB', 'order' => 'random', 'claimTTL' => 3600, ], ], 'JobQueueIncludeInMaxLagFactor' => false, 'SpecialPageCacheUpdates' => [ 'Statistics' => [ 'MediaWiki\\Deferred\\SiteStatsUpdate', 'cacheUpdate', ], ], 'PagePropLinkInvalidations' => [ 'hiddencat' => 'categorylinks', ], 'CategoryMagicGallery' => true, 'CategoryPagingLimit' => 200, 'CategoryCollation' => 'uppercase', 'TempCategoryCollations' => [ ], 'SortedCategories' => false, 'TrackingCategories' => [ ], 'LogTypes' => [ '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'import', 'interwiki', 'patrol', 'merge', 'suppress', 'tag', 'managetags', 'contentmodel', 'renameuser', ], 'LogRestrictions' => [ 'suppress' => 'suppressionlog', ], 'FilterLogTypes' => [ 'patrol' => true, 'tag' => true, 'newusers' => false, ], 'LogNames' => [ '' => 'all-logs-page', 'block' => 'blocklogpage', 'protect' => 'protectlogpage', 'rights' => 'rightslog', 'delete' => 'dellogpage', 'upload' => 'uploadlogpage', 'move' => 'movelogpage', 'import' => 'importlogpage', 'patrol' => 'patrol-log-page', 'merge' => 'mergelog', 'suppress' => 'suppressionlog', ], 'LogHeaders' => [ '' => 'alllogstext', 'block' => 'blocklogtext', 'delete' => 'dellogpagetext', 'import' => 'importlogpagetext', 'merge' => 'mergelogpagetext', 'move' => 'movelogpagetext', 'patrol' => 'patrol-log-header', 'protect' => 'protectlogtext', 'rights' => 'rightslogtext', 'suppress' => 'suppressionlogtext', 'upload' => 'uploadlogpagetext', ], 'LogActions' => [ ], 'LogActionsHandlers' => [ 'block/block' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'block/reblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'block/unblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'contentmodel/change' => 'MediaWiki\\Logging\\ContentModelLogFormatter', 'contentmodel/new' => 'MediaWiki\\Logging\\ContentModelLogFormatter', 'delete/delete' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/delete_redir' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/delete_redir2' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/event' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/restore' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'delete/revision' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'import/interwiki' => 'MediaWiki\\Logging\\ImportLogFormatter', 'import/upload' => 'MediaWiki\\Logging\\ImportLogFormatter', 'interwiki/iw_add' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'interwiki/iw_delete' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'interwiki/iw_edit' => 'MediaWiki\\Logging\\InterwikiLogFormatter', 'managetags/activate' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/create' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/deactivate' => 'MediaWiki\\Logging\\LogFormatter', 'managetags/delete' => 'MediaWiki\\Logging\\LogFormatter', 'merge/merge' => [ 'class' => 'MediaWiki\\Logging\\MergeLogFormatter', 'services' => [ 'TitleParser', ], ], 'merge/merge-into' => [ 'class' => 'MediaWiki\\Logging\\MergeLogFormatter', 'services' => [ 'TitleParser', ], ], 'move/move' => [ 'class' => 'MediaWiki\\Logging\\MoveLogFormatter', 'services' => [ 'TitleParser', ], ], 'move/move_redir' => [ 'class' => 'MediaWiki\\Logging\\MoveLogFormatter', 'services' => [ 'TitleParser', ], ], 'patrol/patrol' => 'MediaWiki\\Logging\\PatrolLogFormatter', 'patrol/autopatrol' => 'MediaWiki\\Logging\\PatrolLogFormatter', 'protect/modify' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/move_prot' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/protect' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'protect/unprotect' => [ 'class' => 'MediaWiki\\Logging\\ProtectLogFormatter', 'services' => [ 'TitleParser', ], ], 'renameuser/renameuser' => [ 'class' => 'MediaWiki\\Logging\\RenameuserLogFormatter', 'services' => [ 'TitleParser', ], ], 'rights/autopromote' => 'MediaWiki\\Logging\\RightsLogFormatter', 'rights/rights' => 'MediaWiki\\Logging\\RightsLogFormatter', 'suppress/block' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'suppress/delete' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'suppress/event' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'suppress/reblock' => [ 'class' => 'MediaWiki\\Logging\\BlockLogFormatter', 'services' => [ 'TitleParser', 'NamespaceInfo', ], ], 'suppress/revision' => 'MediaWiki\\Logging\\DeleteLogFormatter', 'tag/update' => 'MediaWiki\\Logging\\TagLogFormatter', 'upload/overwrite' => 'MediaWiki\\Logging\\UploadLogFormatter', 'upload/revert' => 'MediaWiki\\Logging\\UploadLogFormatter', 'upload/upload' => 'MediaWiki\\Logging\\UploadLogFormatter', ], 'ActionFilteredLogs' => [ 'block' => [ 'block' => [ 'block', ], 'reblock' => [ 'reblock', ], 'unblock' => [ 'unblock', ], ], 'contentmodel' => [ 'change' => [ 'change', ], 'new' => [ 'new', ], ], 'delete' => [ 'delete' => [ 'delete', ], 'delete_redir' => [ 'delete_redir', 'delete_redir2', ], 'restore' => [ 'restore', ], 'event' => [ 'event', ], 'revision' => [ 'revision', ], ], 'import' => [ 'interwiki' => [ 'interwiki', ], 'upload' => [ 'upload', ], ], 'managetags' => [ 'create' => [ 'create', ], 'delete' => [ 'delete', ], 'activate' => [ 'activate', ], 'deactivate' => [ 'deactivate', ], ], 'move' => [ 'move' => [ 'move', ], 'move_redir' => [ 'move_redir', ], ], 'newusers' => [ 'create' => [ 'create', 'newusers', ], 'create2' => [ 'create2', ], 'autocreate' => [ 'autocreate', ], 'byemail' => [ 'byemail', ], ], 'protect' => [ 'protect' => [ 'protect', ], 'modify' => [ 'modify', ], 'unprotect' => [ 'unprotect', ], 'move_prot' => [ 'move_prot', ], ], 'rights' => [ 'rights' => [ 'rights', ], 'autopromote' => [ 'autopromote', ], ], 'suppress' => [ 'event' => [ 'event', ], 'revision' => [ 'revision', ], 'delete' => [ 'delete', ], 'block' => [ 'block', ], 'reblock' => [ 'reblock', ], ], 'upload' => [ 'upload' => [ 'upload', ], 'overwrite' => [ 'overwrite', ], 'revert' => [ 'revert', ], ], ], 'NewUserLog' => true, 'PageCreationLog' => true, 'AllowSpecialInclusion' => true, 'DisableQueryPageUpdate' => false, 'CountCategorizedImagesAsUsed' => false, 'MaxRedirectLinksRetrieved' => 500, 'RangeContributionsCIDRLimit' => [ 'IPv4' => 16, 'IPv6' => 32, ], 'Actions' => [ ], 'DefaultRobotPolicy' => 'index,follow', 'NamespaceRobotPolicies' => [ ], 'ArticleRobotPolicies' => [ ], 'ExemptFromUserRobotsControl' => null, 'DebugAPI' => false, 'APIModules' => [ ], 'APIFormatModules' => [ ], 'APIMetaModules' => [ ], 'APIPropModules' => [ ], 'APIListModules' => [ ], 'APIMaxDBRows' => 5000, 'APIMaxResultSize' => 8388608, 'APIMaxUncachedDiffs' => 1, 'APIMaxLagThreshold' => 7, 'APICacheHelpTimeout' => 3600, 'APIUselessQueryPages' => [ 'MIMEsearch', 'LinkSearch', ], 'AjaxLicensePreview' => true, 'CrossSiteAJAXdomains' => [ ], 'CrossSiteAJAXdomainExceptions' => [ ], 'AllowedCorsHeaders' => [ 'Accept', 'Accept-Language', 'Content-Language', 'Content-Type', 'Accept-Encoding', 'DNT', 'Origin', 'User-Agent', 'Api-User-Agent', 'Access-Control-Max-Age', 'Authorization', ], 'RestAPIAdditionalRouteFiles' => [ ], 'RestSandboxSpecs' => [ ], 'MaxShellMemory' => 307200, 'MaxShellFileSize' => 102400, 'MaxShellTime' => 180, 'MaxShellWallClockTime' => 180, 'ShellCgroup' => false, 'PhpCli' => '/usr/bin/php', 'ShellRestrictionMethod' => 'autodetect', 'ShellboxUrls' => [ 'default' => null, ], 'ShellboxSecretKey' => null, 'ShellboxShell' => '/bin/sh', 'HTTPTimeout' => 25, 'HTTPConnectTimeout' => 5.0, 'HTTPMaxTimeout' => 0, 'HTTPMaxConnectTimeout' => 0, 'HTTPImportTimeout' => 25, 'AsyncHTTPTimeout' => 25, 'HTTPProxy' => '', 'LocalVirtualHosts' => [ ], 'LocalHTTPProxy' => false, 'AllowExternalReqID' => false, 'GenerateReqIDFormat' => 'rand24', 'JobRunRate' => 1, 'RunJobsAsync' => false, 'UpdateRowsPerJob' => 300, 'UpdateRowsPerQuery' => 100, 'RedirectOnLogin' => null, 'VirtualRestConfig' => [ 'paths' => [ ], 'modules' => [ ], 'global' => [ 'timeout' => 360, 'forwardCookies' => false, 'HTTPProxy' => null, ], ], 'EventRelayerConfig' => [ 'default' => [ 'class' => 'Wikimedia\\EventRelayer\\EventRelayerNull', ], ], 'Pingback' => false, 'OriginTrials' => [ ], 'ReportToExpiry' => 86400, 'ReportToEndpoints' => [ ], 'FeaturePolicyReportOnly' => [ ], 'SkinsPreferred' => [ 'vector-2022', 'vector', ], 'SpecialContributeSkinsEnabled' => [ ], 'SpecialContributeNewPageTarget' => null, 'EnableEditRecovery' => false, 'EditRecoveryExpiry' => 2592000, 'UseCodexSpecialBlock' => false, 'ShowLogoutConfirmation' => false, 'EnableProtectionIndicators' => true, 'OutputPipelineStages' => [ ], 'FeatureShutdown' => [ ], 'CloneArticleParserOutput' => true, 'UseLeximorph' => false, 'UsePostprocCacheLegacy' => false, 'UsePostprocCacheParsoid' => true, 'ParserOptionsLogUnsafeSampleRate' => 0, ], 'type' => [ 'ConfigRegistry' => 'object', 'AssumeProxiesUseDefaultProtocolPorts' => 'boolean', 'ForceHTTPS' => 'boolean', 'ExtensionDirectory' => [ 'string', 'null', ], 'StyleDirectory' => [ 'string', 'null', ], 'UploadDirectory' => [ 'string', 'boolean', 'null', ], 'Logos' => [ 'object', 'boolean', ], 'ReferrerPolicy' => [ 'array', 'string', 'boolean', ], 'ActionPaths' => 'object', 'MainPageIsDomainRoot' => 'boolean', 'ImgAuthUrlPathMap' => 'object', 'LocalFileRepo' => 'object', 'ForeignFileRepos' => 'array', 'UseSharedUploads' => 'boolean', 'SharedUploadDirectory' => [ 'string', 'null', ], 'SharedUploadPath' => [ 'string', 'null', ], 'HashedSharedUploadDirectory' => 'boolean', 'FetchCommonsDescriptions' => 'boolean', 'SharedUploadDBname' => [ 'boolean', 'string', ], 'SharedUploadDBprefix' => 'string', 'CacheSharedUploads' => 'boolean', 'ForeignUploadTargets' => 'array', 'UploadDialog' => 'object', 'FileBackends' => 'object', 'LockManagers' => 'array', 'CopyUploadsDomains' => 'array', 'CopyUploadTimeout' => [ 'boolean', 'integer', ], 'SharedThumbnailScriptPath' => [ 'string', 'boolean', ], 'HashedUploadDirectory' => 'boolean', 'CSPUploadEntryPoint' => 'boolean', 'FileExtensions' => 'array', 'ProhibitedFileExtensions' => 'array', 'MimeTypeExclusions' => 'array', 'TrustedMediaFormats' => 'array', 'MediaHandlers' => 'object', 'NativeImageLazyLoading' => 'boolean', 'ParserTestMediaHandlers' => 'object', 'MaxInterlacingAreas' => 'object', 'SVGConverters' => 'object', 'SVGNativeRendering' => [ 'string', 'boolean', ], 'MaxImageArea' => [ 'string', 'integer', 'boolean', ], 'TiffThumbnailType' => 'array', 'GenerateThumbnailOnParse' => 'boolean', 'EnableAutoRotation' => [ 'boolean', 'null', ], 'Antivirus' => [ 'string', 'null', ], 'AntivirusSetup' => 'object', 'MimeDetectorCommand' => [ 'string', 'null', ], 'XMLMimeTypes' => 'object', 'ImageLimits' => 'array', 'ThumbLimits' => 'array', 'ThumbnailNamespaces' => 'array', 'ThumbnailSteps' => [ 'array', 'null', ], 'ThumbnailStepsRatio' => [ 'number', 'null', ], 'ThumbnailBuckets' => [ 'array', 'null', ], 'UploadThumbnailRenderMap' => 'object', 'GalleryOptions' => 'object', 'DjvuDump' => [ 'string', 'null', ], 'DjvuRenderer' => [ 'string', 'null', ], 'DjvuTxt' => [ 'string', 'null', ], 'DjvuPostProcessor' => [ 'string', 'null', ], 'SMTP' => [ 'boolean', 'object', ], 'EnotifFromEditor' => 'boolean', 'EmailConfirmationBanner' => 'boolean', 'EnotifRevealEditorAddress' => 'boolean', 'UsersNotifiedOnAllChanges' => 'object', 'DBmwschema' => [ 'string', 'null', ], 'SharedTables' => 'array', 'DBservers' => [ 'boolean', 'array', ], 'LBFactoryConf' => 'object', 'LocalDatabases' => 'array', 'VirtualDomainsMapping' => 'object', 'FileSchemaMigrationStage' => 'integer', 'ExternalLinksDomainGaps' => 'object', 'ContentHandlers' => 'object', 'NamespaceContentModels' => 'object', 'TextModelsToParse' => 'array', 'ExternalStores' => 'array', 'ExternalServers' => 'object', 'DefaultExternalStore' => [ 'array', 'boolean', ], 'RevisionCacheExpiry' => 'integer', 'PageLanguageUseDB' => 'boolean', 'DiffEngine' => [ 'string', 'null', ], 'ExternalDiffEngine' => [ 'string', 'boolean', ], 'Wikidiff2Options' => 'object', 'RequestTimeLimit' => [ 'integer', 'null', ], 'CriticalSectionTimeLimit' => 'number', 'PoolCounterConf' => [ 'object', 'null', ], 'PoolCountClientConf' => 'object', 'MaxUserDBWriteDuration' => [ 'integer', 'boolean', ], 'MaxJobDBWriteDuration' => [ 'integer', 'boolean', ], 'MultiShardSiteStats' => 'boolean', 'ObjectCaches' => 'object', 'WANObjectCache' => 'object', 'MicroStashType' => [ 'string', 'integer', ], 'ParsoidCacheConfig' => 'object', 'ParsoidSelectiveUpdateSampleRate' => 'integer', 'ParserCacheFilterConfig' => 'object', 'ChronologyProtectorSecret' => 'string', 'PHPSessionHandling' => 'string', 'SuspiciousIpExpiry' => [ 'integer', 'boolean', ], 'MemCachedServers' => 'array', 'LocalisationCacheConf' => 'object', 'ExtensionInfoMTime' => [ 'integer', 'boolean', ], 'CdnServers' => 'object', 'CdnServersNoPurge' => 'object', 'HTCPRouting' => 'object', 'GrammarForms' => 'object', 'ExtraInterlanguageLinkPrefixes' => 'array', 'InterlanguageLinkCodeMap' => 'object', 'ExtraLanguageNames' => 'object', 'ExtraLanguageCodes' => 'object', 'DummyLanguageCodes' => 'object', 'DisabledVariants' => 'object', 'ForceUIMsgAsContentMsg' => 'object', 'RawHtmlMessages' => 'array', 'OverrideUcfirstCharacters' => 'object', 'XhtmlNamespaces' => 'object', 'BrowserFormatDetection' => 'string', 'SkinMetaTags' => 'object', 'SkipSkins' => 'object', 'FragmentMode' => 'array', 'FooterIcons' => 'object', 'InterwikiLogoOverride' => 'array', 'ResourceModules' => 'object', 'ResourceModuleSkinStyles' => 'object', 'ResourceLoaderSources' => 'object', 'ResourceLoaderMaxage' => 'object', 'ResourceLoaderMaxQueryLength' => [ 'integer', 'boolean', ], 'CanonicalNamespaceNames' => 'object', 'ExtraNamespaces' => 'object', 'ExtraGenderNamespaces' => 'object', 'NamespaceAliases' => 'object', 'CapitalLinkOverrides' => 'object', 'NamespacesWithSubpages' => 'object', 'ContentNamespaces' => 'array', 'ShortPagesNamespaceExclusions' => 'array', 'ExtraSignatureNamespaces' => 'array', 'InvalidRedirectTargets' => 'array', 'LocalInterwikis' => 'array', 'InterwikiCache' => [ 'boolean', 'object', ], 'SiteTypes' => 'object', 'UrlProtocols' => 'array', 'TidyConfig' => 'object', 'ParsoidSettings' => 'object', 'ParsoidExperimentalParserFunctionOutput' => 'boolean', 'NoFollowNsExceptions' => 'array', 'NoFollowDomainExceptions' => 'array', 'ExternalLinksIgnoreDomains' => 'array', 'EnableMagicLinks' => 'object', 'ManualRevertSearchRadius' => 'integer', 'RevertedTagMaxDepth' => 'integer', 'CentralIdLookupProviders' => 'object', 'CentralIdLookupProvider' => 'string', 'UserRegistrationProviders' => 'object', 'PasswordPolicy' => 'object', 'AuthManagerConfig' => [ 'object', 'null', ], 'AuthManagerAutoConfig' => 'object', 'RememberMe' => 'string', 'ReauthenticateTime' => 'object', 'AllowSecuritySensitiveOperationIfCannotReauthenticate' => 'object', 'ChangeCredentialsBlacklist' => 'array', 'RemoveCredentialsBlacklist' => 'array', 'PasswordConfig' => 'object', 'PasswordResetRoutes' => 'object', 'SignatureAllowedLintErrors' => 'array', 'ReservedUsernames' => 'array', 'DefaultUserOptions' => 'object', 'ConditionalUserOptions' => 'object', 'HiddenPrefs' => 'array', 'UserJsPrefLimit' => 'integer', 'AuthenticationTokenVersion' => [ 'string', 'null', ], 'SessionProviders' => 'object', 'AutoCreateTempUser' => 'object', 'AutoblockExemptions' => 'array', 'BlockCIDRLimit' => 'object', 'EnableMultiBlocks' => 'boolean', 'GroupPermissions' => 'object', 'PrivilegedGroups' => 'array', 'RevokePermissions' => 'object', 'GroupInheritsPermissions' => 'object', 'ImplicitGroups' => 'array', 'GroupsAddToSelf' => 'object', 'GroupsRemoveFromSelf' => 'object', 'RestrictedGroups' => 'object', 'UserRequirementsPrivateConditions' => 'array', 'RestrictionTypes' => 'array', 'RestrictionLevels' => 'array', 'CascadingRestrictionLevels' => 'array', 'SemiprotectedRestrictionLevels' => 'array', 'NamespaceProtection' => 'object', 'NonincludableNamespaces' => 'object', 'Autopromote' => 'object', 'AutopromoteOnce' => 'object', 'AutopromoteOnceRCExcludedGroups' => 'array', 'AddGroups' => 'object', 'RemoveGroups' => 'object', 'AvailableRights' => 'array', 'ImplicitRights' => 'array', 'AccountCreationThrottle' => [ 'integer', 'array', ], 'TempAccountCreationThrottle' => 'array', 'TempAccountNameAcquisitionThrottle' => 'array', 'SpamRegex' => 'array', 'SummarySpamRegex' => 'array', 'DnsBlacklistUrls' => 'array', 'ProxyList' => [ 'string', 'array', ], 'ProxyWhitelist' => 'array', 'SoftBlockRanges' => 'array', 'RateLimits' => 'object', 'RateLimitsExcludedIPs' => 'array', 'ExternalQuerySources' => 'object', 'PasswordAttemptThrottle' => 'array', 'GrantPermissions' => 'object', 'GrantPermissionGroups' => 'object', 'GrantRiskGroups' => 'object', 'EnableBotPasswords' => 'boolean', 'BotPasswordsCluster' => [ 'string', 'boolean', ], 'BotPasswordsDatabase' => [ 'string', 'boolean', ], 'BotPasswordsLimit' => 'integer', 'CSPHeader' => [ 'boolean', 'object', ], 'CSPReportOnlyHeader' => [ 'boolean', 'object', ], 'CSPFalsePositiveUrls' => 'object', 'AllowCrossOrigin' => 'boolean', 'RestAllowCrossOriginCookieAuth' => 'boolean', 'CookieSameSite' => [ 'string', 'null', ], 'CacheVaryCookies' => 'array', 'TrxProfilerLimits' => 'object', 'DebugLogGroups' => 'object', 'MWLoggerDefaultSpi' => 'object', 'Profiler' => 'object', 'StatsTarget' => [ 'string', 'null', ], 'StatsFormat' => [ 'string', 'null', ], 'StatsPrefix' => 'string', 'OpenTelemetryConfig' => [ 'object', 'null', ], 'OpenSearchTemplates' => 'object', 'NamespacesToBeSearchedDefault' => 'object', 'SitemapNamespaces' => [ 'boolean', 'array', ], 'SitemapNamespacesPriorities' => [ 'boolean', 'object', ], 'SitemapApiConfig' => 'object', 'SpecialSearchFormOptions' => 'object', 'SearchMatchRedirectPreference' => 'boolean', 'SearchRunSuggestedQuery' => 'boolean', 'PreviewOnOpenNamespaces' => 'object', 'ReadOnlyWatchedItemStore' => 'boolean', 'GitRepositoryViewers' => 'object', 'InstallerInitialPages' => 'array', 'RCLinkLimits' => 'array', 'RCLinkDays' => 'array', 'RCFeeds' => 'object', 'OverrideSiteFeed' => 'object', 'FeedClasses' => 'object', 'AdvertisedFeedTypes' => 'array', 'SoftwareTags' => 'object', 'RecentChangesFlags' => 'object', 'WatchlistExpiry' => 'boolean', 'EnableWatchlistLabels' => 'boolean', 'WatchlistLabelsMaxPerUser' => 'integer', 'WatchlistPurgeRate' => 'number', 'WatchlistExpiryMaxDuration' => [ 'string', 'null', ], 'EnableChangesListQueryPartitioning' => 'boolean', 'ImportSources' => 'object', 'ExtensionFunctions' => 'array', 'ExtensionMessagesFiles' => 'object', 'MessagesDirs' => 'object', 'TranslationAliasesDirs' => 'object', 'ExtensionEntryPointListFiles' => 'object', 'ValidSkinNames' => 'object', 'SpecialPages' => 'object', 'ExtensionCredits' => 'object', 'Hooks' => 'object', 'ServiceWiringFiles' => 'array', 'JobClasses' => 'object', 'JobTypesExcludedFromDefaultQueue' => 'array', 'JobBackoffThrottling' => 'object', 'JobTypeConf' => 'object', 'SpecialPageCacheUpdates' => 'object', 'PagePropLinkInvalidations' => 'object', 'TempCategoryCollations' => 'array', 'SortedCategories' => 'boolean', 'TrackingCategories' => 'array', 'LogTypes' => 'array', 'LogRestrictions' => 'object', 'FilterLogTypes' => 'object', 'LogNames' => 'object', 'LogHeaders' => 'object', 'LogActions' => 'object', 'LogActionsHandlers' => 'object', 'ActionFilteredLogs' => 'object', 'RangeContributionsCIDRLimit' => 'object', 'Actions' => 'object', 'NamespaceRobotPolicies' => 'object', 'ArticleRobotPolicies' => 'object', 'ExemptFromUserRobotsControl' => [ 'array', 'null', ], 'APIModules' => 'object', 'APIFormatModules' => 'object', 'APIMetaModules' => 'object', 'APIPropModules' => 'object', 'APIListModules' => 'object', 'APIUselessQueryPages' => 'array', 'CrossSiteAJAXdomains' => 'object', 'CrossSiteAJAXdomainExceptions' => 'object', 'AllowedCorsHeaders' => 'array', 'RestAPIAdditionalRouteFiles' => 'array', 'RestSandboxSpecs' => 'object', 'ShellRestrictionMethod' => [ 'string', 'boolean', ], 'ShellboxUrls' => 'object', 'ShellboxSecretKey' => [ 'string', 'null', ], 'ShellboxShell' => [ 'string', 'null', ], 'HTTPTimeout' => 'number', 'HTTPConnectTimeout' => 'number', 'HTTPMaxTimeout' => 'number', 'HTTPMaxConnectTimeout' => 'number', 'LocalVirtualHosts' => 'object', 'LocalHTTPProxy' => [ 'string', 'boolean', ], 'GenerateReqIDFormat' => 'string', 'VirtualRestConfig' => 'object', 'EventRelayerConfig' => 'object', 'Pingback' => 'boolean', 'OriginTrials' => 'array', 'ReportToExpiry' => 'integer', 'ReportToEndpoints' => 'array', 'FeaturePolicyReportOnly' => 'array', 'SkinsPreferred' => 'array', 'SpecialContributeSkinsEnabled' => 'array', 'SpecialContributeNewPageTarget' => [ 'string', 'null', ], 'EnableEditRecovery' => 'boolean', 'EditRecoveryExpiry' => 'integer', 'UseCodexSpecialBlock' => 'boolean', 'ShowLogoutConfirmation' => 'boolean', 'EnableProtectionIndicators' => 'boolean', 'OutputPipelineStages' => 'object', 'FeatureShutdown' => 'array', 'CloneArticleParserOutput' => 'boolean', 'UseLeximorph' => 'boolean', 'UsePostprocCacheLegacy' => 'boolean', 'UsePostprocCacheParsoid' => 'boolean', 'ParserOptionsLogUnsafeSampleRate' => 'integer', ], 'mergeStrategy' => [ 'TiffThumbnailType' => 'replace', 'LBFactoryConf' => 'replace', 'InterwikiCache' => 'replace', 'PasswordPolicy' => 'array_replace_recursive', 'AuthManagerAutoConfig' => 'array_plus_2d', 'GroupPermissions' => 'array_plus_2d', 'RevokePermissions' => 'array_plus_2d', 'AddGroups' => 'array_merge_recursive', 'RemoveGroups' => 'array_merge_recursive', 'RateLimits' => 'array_plus_2d', 'GrantPermissions' => 'array_plus_2d', 'MWLoggerDefaultSpi' => 'replace', 'Profiler' => 'replace', 'Hooks' => 'array_merge_recursive', 'VirtualRestConfig' => 'array_plus_2d', ], 'dynamicDefault' => [ 'UsePathInfo' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultUsePathInfo', ], ], 'Script' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultScript', ], ], 'LoadScript' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLoadScript', ], ], 'RestPath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultRestPath', ], ], 'StylePath' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultStylePath', ], ], 'LocalStylePath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocalStylePath', ], ], 'ExtensionAssetsPath' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultExtensionAssetsPath', ], ], 'ArticlePath' => [ 'use' => [ 'Script', 'UsePathInfo', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultArticlePath', ], ], 'UploadPath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultUploadPath', ], ], 'FileCacheDirectory' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultFileCacheDirectory', ], ], 'Logo' => [ 'use' => [ 'ResourceBasePath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLogo', ], ], 'DeletedDirectory' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultDeletedDirectory', ], ], 'ShowEXIF' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultShowEXIF', ], ], 'SharedPrefix' => [ 'use' => [ 'DBprefix', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultSharedPrefix', ], ], 'SharedSchema' => [ 'use' => [ 'DBmwschema', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultSharedSchema', ], ], 'DBerrorLogTZ' => [ 'use' => [ 'Localtimezone', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultDBerrorLogTZ', ], ], 'Localtimezone' => [ 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocaltimezone', ], ], 'LocalTZoffset' => [ 'use' => [ 'Localtimezone', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultLocalTZoffset', ], ], 'ResourceBasePath' => [ 'use' => [ 'ScriptPath', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultResourceBasePath', ], ], 'MetaNamespace' => [ 'use' => [ 'Sitename', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultMetaNamespace', ], ], 'CookieSecure' => [ 'use' => [ 'ForceHTTPS', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultCookieSecure', ], ], 'CookiePrefix' => [ 'use' => [ 'SharedDB', 'SharedPrefix', 'SharedTables', 'DBname', 'DBprefix', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultCookiePrefix', ], ], 'ReadOnlyFile' => [ 'use' => [ 'UploadDirectory', ], 'callback' => [ 'MediaWiki\\MainConfigSchema', 'getDefaultReadOnlyFile', ], ], ], ], 'config-schema' => [ 'UploadStashScalerBaseUrl' => [ 'deprecated' => 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo', ], 'IllegalFileChars' => [ 'deprecated' => 'since 1.41; no longer customizable', ], 'ThumbnailNamespaces' => [ 'items' => [ 'type' => 'integer', ], ], 'LocalDatabases' => [ 'items' => [ 'type' => 'string', ], ], 'ParserCacheFilterConfig' => [ 'additionalProperties' => [ 'type' => 'object', 'description' => 'A map of namespace IDs to filter definitions.', 'additionalProperties' => [ 'type' => 'object', 'description' => 'A map of filter names to values.', 'properties' => [ 'minCpuTime' => [ 'type' => 'number', ], ], ], ], ], 'PHPSessionHandling' => [ 'deprecated' => 'since 1.45 Integration with PHP session handling will be removed in the future', ], 'RawHtmlMessages' => [ 'items' => [ 'type' => 'string', ], ], 'InterwikiLogoOverride' => [ 'items' => [ 'type' => 'string', ], ], 'LegalTitleChars' => [ 'deprecated' => 'since 1.41; use Extension:TitleBlacklist to customize', ], 'ReauthenticateTime' => [ 'additionalProperties' => [ 'type' => 'integer', ], ], 'AllowSecuritySensitiveOperationIfCannotReauthenticate' => [ 'additionalProperties' => [ 'type' => 'boolean', ], ], 'ChangeCredentialsBlacklist' => [ 'items' => [ 'type' => 'string', ], ], 'RemoveCredentialsBlacklist' => [ 'items' => [ 'type' => 'string', ], ], 'GroupPermissions' => [ 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'boolean', ], ], ], 'GroupInheritsPermissions' => [ 'additionalProperties' => [ 'type' => 'string', ], ], 'AvailableRights' => [ 'items' => [ 'type' => 'string', ], ], 'ImplicitRights' => [ 'items' => [ 'type' => 'string', ], ], 'SoftBlockRanges' => [ 'items' => [ 'type' => 'string', ], ], 'ExternalQuerySources' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'enabled' => [ 'type' => 'boolean', 'default' => false, ], 'url' => [ 'type' => 'string', 'format' => 'uri', ], 'timeout' => [ 'type' => 'integer', 'default' => 10, ], ], 'required' => [ 'enabled', 'url', ], 'additionalProperties' => false, ], ], 'GrantPermissions' => [ 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'boolean', ], ], ], 'GrantPermissionGroups' => [ 'additionalProperties' => [ 'type' => 'string', ], ], 'SitemapNamespacesPriorities' => [ 'deprecated' => 'since 1.45 and ignored', ], 'SitemapApiConfig' => [ 'additionalProperties' => [ 'enabled' => [ 'type' => 'bool', ], 'sitemapsPerIndex' => [ 'type' => 'int', ], 'pagesPerSitemap' => [ 'type' => 'int', ], 'expiry' => [ 'type' => 'int', ], ], ], 'SoftwareTags' => [ 'additionalProperties' => [ 'type' => 'boolean', ], ], 'JobBackoffThrottling' => [ 'additionalProperties' => [ 'type' => 'number', ], ], 'JobTypeConf' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'class' => [ 'type' => 'string', ], 'order' => [ 'type' => 'string', ], 'claimTTL' => [ 'type' => 'integer', ], ], ], ], 'TrackingCategories' => [ 'deprecated' => 'since 1.25 Extensions should now register tracking categories using the new extension registration system.', ], 'RangeContributionsCIDRLimit' => [ 'additionalProperties' => [ 'type' => 'integer', ], ], 'RestSandboxSpecs' => [ 'additionalProperties' => [ 'type' => 'object', 'properties' => [ 'url' => [ 'type' => 'string', 'format' => 'url', ], 'name' => [ 'type' => 'string', ], 'file' => [ 'type' => 'string', ], 'msg' => [ 'type' => 'string', 'description' => 'a message key', ], ], ], ], 'ShellboxUrls' => [ 'additionalProperties' => [ 'type' => [ 'string', 'boolean', 'null', ], ], ], ], 'obsolete-config' => [ 'MangleFlashPolicy' => 'Since 1.39; no longer has any effect.', 'EnableOpenSearchSuggest' => 'Since 1.35, no longer used', 'AutoloadAttemptLowercase' => 'Since 1.40; no longer has any effect.', ],]
Interface to a relational database.
Definition IDatabase.php:31
unlock( $lockName, $method)
Release a lock.
lock( $lockName, $method, $timeout=5, $flags=0)
Acquire a named lock.
newDeleteQueryBuilder()
Get an DeleteQueryBuilder bound to this connection.
affectedRows()
Get the number of rows affected by the last query method call.
This class is a delegate to ILBFactory for a given database cluster.
Advanced database interface for IDatabase handles that include maintenance methods.
newSelectQueryBuilder()
Create an empty SelectQueryBuilder which can be used to run queries against this connection.
expr(string $field, string $op, $value)
See Expression::__construct()
timestamp( $ts=0)
Convert a timestamp in one of the formats accepted by ConvertibleTimestamp to the format used for ins...
setLastError( $error)
This is actually implemented in the Job class.