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 created this task.Oct 2 2017, 5:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 2 2017, 5:25 PM
Reedy triaged this task as Low priority.Oct 2 2017, 5:25 PM
Reedy added a project: Technical-Debt.
Legoktm updated the task description. (Show Details)Dec 6 2017, 9:23 AM
Legoktm added a project: Google-Code-in-2017.
Legoktm added a subscriber: Legoktm.

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

Reedy added a comment.Dec 13 2017, 7:13 PM

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 closed this task as Resolved.Dec 13 2017, 9:13 PM
Reedy removed a project: Patch-For-Review.