mediawiki-extensions-Echo/scripts/gen-autoload.php
James D. Forrester 8c810dff48 build: Update mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I25cb61b3b92798f1259d1575a336e2b056d5764f
2016-12-05 15:54:30 -08:00

33 lines
655 B
PHP

<?php
require_once __DIR__ . '/../../../includes/utils/AutoloadGenerator.php';
// @codingStandardsIgnoreStart
function main() {
// @codingStandardsIgnoreEnd
$base = dirname( __DIR__ );
$generator = new AutoloadGenerator( $base );
$dirs = [
'includes',
'tests',
'maintenance',
];
foreach ( $dirs as $dir ) {
$generator->readDir( $base . '/' . $dir );
}
foreach ( glob( $base . '/*.php' ) as $file ) {
$generator->readFile( $file );
}
$target = $generator->getTargetFileInfo();
file_put_contents(
$target['filename'],
$generator->getAutoload( basename( __DIR__ ) . '/' . basename( __FILE__ ) )
);
echo "Done.\n\n";
}
main();