tgr@deployment-mwmaint01:~$ mwscript importDump.php enwiki /home/tgr/dump-test.xml --no-local-users --username-prefix enwiki --report 50 --debug --dry-run Wikimedia\NormalizedException\NormalizedException from line 711 of /srv/mediawiki/php-master/includes/import/WikiImporter.php: XML error at line 1: Extra content at the end of the document #0 /srv/mediawiki/php-master/maintenance/importDump.php(354): WikiImporter->doImport() #1 /srv/mediawiki/php-master/maintenance/importDump.php(286): BackupReader->importFromHandle(false) #2 /srv/mediawiki/php-master/maintenance/importDump.php(130): BackupReader->importFromFile('/home/tgr/dump-...') #3 /srv/mediawiki/php-master/maintenance/doMaintenance.php(108): BackupReader->execute() #4 /srv/mediawiki/php-master/maintenance/importDump.php(359): require_once('/srv/mediawiki/...') #5 /srv/mediawiki/multiversion/MWScript.php(116): require_once('/srv/mediawiki/...') #6 {main}
(this is with https://gerrit.wikimedia.org/r/c/mediawiki/core/+/731261 applied; without it I get the even more nondescript Import failed Expected <mediawiki> tag, got. The XML file passes validation and works on my local (Vagrant) wiki, so it seems like this is somehow specific to Beta. Walking through the main steps with XMLReader in shell.php works as expected.