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

This commit is contained in:
jenkins-bot 2017-06-23 19:48:06 +00:00 committed by Gerrit Code Review
commit 90d627bbd6

View file

@ -1,10 +1,21 @@
<?php
require_once __DIR__ . '/../../../includes/utils/AutoloadGenerator.php';
// Keep in sync with same script in Flow.
// @codingStandardsIgnoreStart
function main() {
// @codingStandardsIgnoreEnd
require_once getenv( 'MW_INSTALL_PATH' ) !== false
? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
: __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__ );
$generator = new AutoloadGenerator( $base );
$dirs = [
@ -28,5 +39,7 @@ function main() {
echo "Done.\n\n";
}
}
main();
$maintClass = "GenerateEchoAutoload";
require_once RUN_MAINTENANCE_IF_MAIN;