When trying to import text files using maintenance/importTextFiles.php, I get the following error:
TypeError from line 95 of /path/to/includes/content/ContentHandlerFactory.php: Argument 1 passed to MediaWiki\Content\ContentHandlerFactory::getContentHandler() must be of the type string, null given, called in /path/to/includes/content/ContentHandler.php on line 272
After a bit of debugging, I could fix it for my use case by adding the following at line 140:
$rev->setModel( 'wikitext' )
I could send this as a patch, but I suspect the proper way to do it would be to auto-detect the content model out of the filetype of the imported files, or at least add a parameter for specifying the content model, rather than hardcoding 'wikitext', yes?