wiki.techinc.nl/maintenance/generateLocalAutoload.php
Florian 23c79b228c Structure test: Add autoload.php order check
If a class is added manually to the autoload.php another run of
the maintenance script will probably add unnecessary noise to
another change. The added structure test checks, if the output of
the maintenance script equals to the contents of the commited
autoload.php.

Bug: T121921
Change-Id: I3a426b92892f4c00cab33a13f6a717751120367c
2016-08-03 09:50:27 +00:00

20 lines
510 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' );
$generator->initMediaWikiDefault();
// Write out the autoload
$fileinfo = $generator->getTargetFileinfo();
file_put_contents(
$fileinfo['filename'],
$generator->getAutoload( 'maintenance/generateLocalAutoload.php' )
);