Fix SQLite patch-(page|template)links-fix-pk.sql column order
[lhc/web/wiklou.git] / maintenance / findHooks.php
index 900752f..6d5dda1 100644 (file)
@@ -34,6 +34,8 @@
  * @author Antoine Musso <hashar at free dot fr>
  */
 
+use MediaWiki\MediaWikiServices;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -80,7 +82,7 @@ class FindHooks extends Maintenance {
                        "$IP/",
                ];
                $extraFiles = [
-                       "$IP/tests/phpunit/MediaWikiTestCase.php",
+                       "$IP/tests/phpunit/MediaWikiIntegrationTestCase.php",
                ];
 
                foreach ( $recurseDirs as $dir ) {
@@ -216,7 +218,7 @@ class FindHooks extends Maintenance {
 
                $retval = [];
                while ( true ) {
-                       $json = Http::get(
+                       $json = MediaWikiServices::getInstance()->getHttpRequestFactory()->get(
                                wfAppendQuery( 'https://www.mediawiki.org/w/api.php', $params ),
                                [],
                                __METHOD__
@@ -304,7 +306,7 @@ class FindHooks extends Maintenance {
        /**
         * Get hooks from a directory of PHP files.
         * @param string $dir Directory path to start at
-        * @param int $recursive Pass self::FIND_RECURSIVE
+        * @param int $recurse Pass self::FIND_RECURSIVE
         * @return array Array: key => hook name; value => array of arguments or string 'unknown'
         */
        private function getHooksFromDir( $dir, $recurse = 0 ) {