<exclude-pattern>*/includes/gallery/PackedOverlayImageGallery\.php</exclude-pattern>
<exclude-pattern>*/includes/HistoryBlob\.php</exclude-pattern>
<exclude-pattern>*/includes/htmlform/HTMLFormElement\.php</exclude-pattern>
- <exclude-pattern>*/includes/jobqueue/aggregator/JobQueueAggregator\.php</exclude-pattern>
<exclude-pattern>*/includes/libs/filebackend/FileBackendStore\.php</exclude-pattern>
<exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
<exclude-pattern>*/includes/libs/filebackend/SwiftFileBackend\.php</exclude-pattern>
AuthManagerAuthPlugin, and AuthManagerAuthPluginUser.
* The $wgAuth configuration setting and its use in Setup.php and unit tests
* (T217772) The 'wgAvailableSkins' mw.config key in JavaScript, was removed.
+* Language::markNoConversion, deprecated in 1.32, has been removed. Use
+ LanguageConverter::markNoConversion instead.
=== Deprecations in 1.33 ===
* The configuration option $wgUseESI has been deprecated, and is expected
'Job' => __DIR__ . '/includes/jobqueue/Job.php',
'JobQueue' => __DIR__ . '/includes/jobqueue/JobQueue.php',
'JobQueueAggregator' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php',
- 'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php',
+ 'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorNull.php',
'JobQueueAggregatorRedis' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php',
'JobQueueConnectionError' => __DIR__ . '/includes/jobqueue/exception/JobQueueConnectionError.php',
'JobQueueDB' => __DIR__ . '/includes/jobqueue/JobQueueDB.php',
*/
public function processTemplate( $templateName, $args, array $scopes = [] ) {
$template = $this->getTemplate( $templateName );
- return call_user_func( $template, $args, $scopes );
+ return $template( $args, $scopes );
}
}
wfDebugLog( 'cookie', 'already set ' . $func . ': "' . implode( '", "', $data ) . '"' );
} else {
wfDebugLog( 'cookie', $func . ': "' . implode( '", "', $data ) . '"' );
- if ( call_user_func_array( $func, array_values( $data ) ) ) {
+ if ( $func( ...array_values( $data ) ) ) {
self::$setCookies[$key] = $deleting ? null : [ $func, $data ];
}
}
if ( !is_callable( $function ) ) {
return null;
} else {
- $this->$name = call_user_func( $function );
+ $this->$name = $function();
return $this->$name;
}
public function getDefault() {
$default = parent::getDefault();
if ( $default instanceof Closure ) {
- $default = call_user_func( $default, $this->mParams );
+ $default = $default( $this->mParams );
}
return $default;
}
return $pendingDBs;
}
}
-
-/**
- * @ingroup JobQueue
- */
-class JobQueueAggregatorNull extends JobQueueAggregator {
- protected function doNotifyQueueEmpty( $wiki, $type ) {
- return true;
- }
-
- protected function doNotifyQueueNonEmpty( $wiki, $type ) {
- return true;
- }
-
- protected function doGetAllReadyWikiQueues() {
- return [];
- }
-
- protected function doPurge() {
- return true;
- }
-}
--- /dev/null
+<?php
+/**
+ * Job queue aggregator code.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup JobQueue
+ */
+class JobQueueAggregatorNull extends JobQueueAggregator {
+ protected function doNotifyQueueEmpty( $wiki, $type ) {
+ return true;
+ }
+
+ protected function doNotifyQueueNonEmpty( $wiki, $type ) {
+ return true;
+ }
+
+ protected function doGetAllReadyWikiQueues() {
+ return [];
+ }
+
+ protected function doPurge() {
+ return true;
+ }
+}
}
throw new UnexpectedValueException( "callback '$cb' is not callable" );
}
- call_user_func( $cb, $info['credits'][$name] );
+ $cb( $info['credits'][$name] );
}
}
$this->mConverter->updateConversionTable( $title );
}
- /**
- * Prepare external link text for conversion. When the text is
- * a URL, it shouldn't be converted, and it'll be wrapped in
- * the "raw" tag (-{R| }-) to prevent conversion.
- *
- * This function is called "markNoConversion" for historical
- * reasons *BUT DIFFERS SIGNIFICANTLY* from
- * LanguageConverter::markNoConversion(), with which it is easily
- * confused.
- *
- * @param string $text Text to be used for external link
- * @param bool $noParse Wrap it without confirming it's a real URL first
- * @return string The tagged text
- * @deprecated since 1.32, use LanguageConverter::markNoConversion()
- * instead.
- */
- public function markNoConversion( $text, $noParse = false ) {
- wfDeprecated( __METHOD__, '1.32' );
- // Excluding protocal-relative URLs may avoid many false positives.
- if ( $noParse || preg_match( '/^(?:' . wfUrlProtocolsWithoutProtRel() . ')/', $text ) ) {
- return $this->mConverter->markNoConversion( $text );
- } else {
- return $text;
- }
- }
-
/**
* A regular expression to match legal word-trailing characters
* which should be merged onto a link of the form [[foo]]bar.