Page MenuHomePhabricator

Fix autoloading of database dumps related maintenance scripts in MediaWiki core
Closed, ResolvedPublic

Description

This task is about the maintenance scripts in MediaWiki core.

https://gerrit.wikimedia.org/r/#/c/378543/ broke the database dumps, because the autoloader is only invoked after the require_once RUN_MAINTENANCE_IF_MAIN thing. But there's a class in this file that extends DumpFilter *before* the autoloader. If those classes were also moved out of this file then it would all just work.

So we need to move the ExportProgressFilter class from that file into includes/export/ExportProgressFilter.php, and add it to autoload.php in MediaWiki core. Then https://gerrit.wikimedia.org/r/#/c/378543/ can be re-applied.

Event Timeline

Reedy triaged this task as Low priority.Oct 2 2017, 5:25 PM
Reedy added a project: Technical-Debt.
Legoktm added a project: Google-Code-in-2017.
Legoktm subscribed.

I will mentor this in Google-Code-in-2017 (and probably Reedy too? ;))

Aklapper renamed this task from Fixup autoloading of dumps related maintenance scripts to Fix autoloading of database dumps related maintenance scripts in MediaWiki core.Dec 6 2017, 11:50 AM
Aklapper updated the task description. (Show Details)
Aklapper moved this task from Proposed tasks to Imported in GCI Site on the Google-Code-in-2017 board.

Change 398074 had a related patch set uploaded (by Albert221; owner: Albert221):
[mediawiki/core@master] Fix autoloading of ExportProgressFilter

https://gerrit.wikimedia.org/r/398074

I just noticed dumpTextPass.php has require_once __DIR__ . '/../includes/export/WikiExporter.php'; which should be redundant too...

@Reedy, php maintenance/dumpTextPass.php gives me:

Fatal error: Class 'WikiExporter' not found in E:\mediawiki-core\maintenance\doMaintenance.php on line 48

so I don't think that simply removing that line would be a good idea.

Change 398074 merged by jenkins-bot:
[mediawiki/core@master] Fix autoloading of ExportProgressFilter

https://gerrit.wikimedia.org/r/398074

Reedy removed a project: Patch-For-Review.