mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 09:40:41 +00:00
8c810dff48
Also added "composer fix" command. Change-Id: I25cb61b3b92798f1259d1575a336e2b056d5764f
33 lines
655 B
PHP
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();
|