public $mLinkID;
public $mIncludeSizes, $mPPNodeCount, $mGeneratedPPNodeCount, $mHighestExpansionDepth;
public $mDefaultSort;
- public $mTplRedirCache, $mTplDomCache, $mHeadings, $mDoubleUnderscores;
+ public $mTplRedirCache, $mHeadings, $mDoubleUnderscores;
public $mExpensiveFunctionCount; # number of expensive parser function calls
public $mShowToc, $mForceTocPosition;
+ /** @var array */
+ public $mTplDomCache;
/**
* @var User
* Which class should we use for the preprocessor if not otherwise specified?
*
* @since 1.34
+ * @deprecated since 1.34, removing configurability of preprocessor
* @return string
*/
public static function getDefaultPreprocessorClass() {
- if ( wfIsHHVM() ) {
- # Under HHVM Preprocessor_Hash is much faster than Preprocessor_DOM
- return Preprocessor_Hash::class;
- }
- if ( extension_loaded( 'domxml' ) ) {
- # PECL extension that conflicts with the core DOM extension (T15770)
- wfDebug( "Warning: you have the obsolete domxml extension for PHP. Please remove it!\n" );
- return Preprocessor_Hash::class;
- }
- if ( extension_loaded( 'dom' ) ) {
- return Preprocessor_DOM::class;
- }
return Preprocessor_Hash::class;
}
$limitReport .= 'Dynamic content: ' .
( $this->mOutput->hasDynamicContent() ? 'true' : 'false' ) .
"\n";
+ $limitReport .= 'Complications: [' . implode( ', ', $this->mOutput->getAllFlags() ) . "]\n";
foreach ( $this->mOutput->getLimitReportData() as $key => $value ) {
if ( Hooks::run( 'ParserLimitReportFormat',
* self::OT_HTML: all templates and extension tags
*
* @param string $text The text to transform
- * @param bool|PPFrame $frame Object describing the arguments passed to the
+ * @param false|PPFrame|array $frame Object describing the arguments passed to the
* template. Arguments may also be provided as an associative array, as
* was the usual case before MW1.12. Providing arguments this way may be
* useful for extensions wishing to perform variable replacement
* $piece['lineStart']: whether the brace was at the start of a line
* @param PPFrame $frame The current frame, contains template arguments
* @throws Exception
- * @return string The text of the template
+ * @return string|array The text of the template
*/
public function braceSubstitution( $piece, $frame ) {
// Flags
'deps' => $deps ];
}
- /**
- * Fetch a file and its title and register a reference to it.
- * If 'broken' is a key in $options then the file will appear as a broken thumbnail.
- * @param Title $title
- * @param array $options Array of options to RepoGroup::findFile
- * @return File|bool
- * @deprecated since 1.32, use fetchFileAndTitle instead
- */
- public function fetchFile( $title, $options = [] ) {
- wfDeprecated( __METHOD__, '1.32' );
- return $this->fetchFileAndTitle( $title, $options )[0];
- }
-
/**
* Fetch a file and its title and register a reference to it.
* If 'broken' is a key in $options then the file will appear as a broken thumbnail.
} elseif ( isset( $options['sha1'] ) ) { // get by (sha1,timestamp)
$file = RepoGroup::singleton()->findFileFromKey( $options['sha1'], $options );
} else { // get by (name,timestamp)
- $file = wfFindFile( $title, $options );
+ $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title, $options );
}
return $file;
}