-foreach ( [ 'includes', 'languages', 'maintenance', 'mw-config' ] as $dir ) {
- $generator->readDir( $base . '/' . $dir );
-}
-foreach ( glob( $base . '/*.php' ) as $file ) {
- $generator->readFile( $file );
-}
-
-// This class is not defined, but might be added by the installer
-$generator->forceClassPath( 'MyLocalSettingsGenerator', "$base/mw-config/overrides.php" );
+$generator->setExcludePaths( array_values( AutoLoader::getAutoloadNamespaces() ) );
+$generator->initMediaWikiDefault();