wiki.techinc.nl/maintenance/generateLocalAutoload.php
Kunal Mehta 6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00

24 lines
752 B
PHP

<?php
if ( PHP_SAPI != 'cli' ) {
die( "This script can only be run from the command line.\n" );
}
require_once __DIR__ . '/../includes/utils/AutoloadGenerator.php';
// Mediawiki installation directory
$base = dirname( __DIR__ );
$generator = new AutoloadGenerator( $base, 'local' );
foreach ( [ 'includes', 'languages', 'maintenance', 'mw-config' ] as $dir ) {
$generator->readDir( $base . '/' . $dir );
}
foreach ( glob( $base . '/*.php' ) as $file ) {
$generator->readFile( $file );
}
// This class is not defined, but might be added by the installer
$generator->forceClassPath( 'MyLocalSettingsGenerator', "$base/mw-config/overrides.php" );
// Write out the autoload
$generator->generateAutoload( 'maintenance/generateLocalAutoload.php' );