Prior to this change, the second parameter to WikiImporter was optional. If the parameter didn't exist, it would get filled in with a MediaWikiServices::getInstance()->getMainConfig(). It would also emit a hard deprecation warning. This behavior has existed since 1.25.
Bug: T61113
Change-Id: Ic15cc103c7d2b7fb499f1632c0001b8a3dbdf778
* mw.util.escapeId() was deprecated, use escapeIdForAttribute() or
escapeIdForLink().
* MagicWord::replaceMultiple() (deprecated in 1.25) was removed.
+* WikiImporter now requires the second parameter to be an instance of the Config,
+ class. Prior to that, the Config parameter was optional (a behavior deprecated in
+ 1.25).
== Compatibility ==
MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
* @param Config $config
* @throws Exception
*/
- function __construct( ImportSource $source, Config $config = null ) {
+ function __construct( ImportSource $source, Config $config ) {
if ( !class_exists( 'XMLReader' ) ) {
throw new Exception( 'Import requires PHP to have been compiled with libxml support' );
}
$this->reader = new XMLReader();
- if ( !$config ) {
- wfDeprecated( __METHOD__ . ' without a Config instance', '1.25' );
- $config = MediaWikiServices::getInstance()->getMainConfig();
- }
$this->config = $config;
if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) {