Merge "Document that services don't normally vary by global state"
[lhc/web/wiklou.git] / maintenance / preprocessDump.php
index 963bfec..ec759da 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
-use MediaWiki\Storage\RevisionRecord;
+use MediaWiki\Revision\RevisionRecord;
 
 require_once __DIR__ . '/dumpIterator.php';
 
@@ -41,6 +41,8 @@ class PreprocessDump extends DumpIterator {
        /* Variables for dressing up as a parser */
        public $mTitle = 'PreprocessDump';
        public $mPPNodeCount = 0;
+       /** @var Preprocessor */
+       public $mPreprocessor;
 
        public function getStripList() {
                $parser = MediaWikiServices::getInstance()->getParser();
@@ -73,8 +75,9 @@ class PreprocessDump extends DumpIterator {
                        $name = Preprocessor_DOM::class;
                }
 
-               MediaWikiServices::getInstance()->getParser()->firstCallInit();
-               $this->mPreprocessor = new $name( $this );
+               $parser = MediaWikiServices::getInstance()->getParser();
+               $parser->firstCallInit();
+               $this->mPreprocessor = new $name( $parser );
        }
 
        /**