Convert gen-autoload.php to maintenance script to fix error

Same solution I used for Flow.

See Ibbc95c2bdd0e7012cf05a6c9196869aed1e99989

Change-Id: Id0a99b61226faee63d5e655a816b687747c7e671
This commit is contained in:
Matthew Flaschen 2017-06-16 00:28:45 -04:00 committed by Catrope
parent 12327e0cb3
commit 2dfb4511e9

View file

@ -1,10 +1,21 @@
<?php <?php
require_once __DIR__ . '/../../../includes/utils/AutoloadGenerator.php'; // Keep in sync with same script in Flow.
// @codingStandardsIgnoreStart require_once getenv( 'MW_INSTALL_PATH' ) !== false
function main() { ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
// @codingStandardsIgnoreEnd : __DIR__ . '/../../../maintenance/Maintenance.php';
/**
* Generates Echo autoload info
*/
class GenerateEchoAutoload extends Maintenance {
public function __construct() {
$this->mDescription = 'Generates Echo autoload data';
}
public function execute() {
$base = dirname( __DIR__ ); $base = dirname( __DIR__ );
$generator = new AutoloadGenerator( $base ); $generator = new AutoloadGenerator( $base );
$dirs = [ $dirs = [
@ -28,5 +39,7 @@ function main() {
echo "Done.\n\n"; echo "Done.\n\n";
} }
}
main(); $maintClass = "GenerateEchoAutoload";
require_once RUN_MAINTENANCE_IF_MAIN;