37 $vars =
Installer::getExistingLocalSettings();
39 $registry = ExtensionRegistry::getInstance();
40 $queue = $registry->getQueue();
42 $registry->clearQueue();
45 $extInfo = $registry->readFromQueue( $queue );
49 $legacySchemaHooks = $extInfo[
'globals'][
'wgHooks'][
'LoadExtensionSchemaUpdates'] ?? [];
50 if ( $vars && isset( $vars[
'wgHooks'][
'LoadExtensionSchemaUpdates'] ) ) {
51 $legacySchemaHooks = array_merge( $legacySchemaHooks, $vars[
'wgHooks'][
'LoadExtensionSchemaUpdates'] );
56 if ( $vars && isset( $vars[
'wgAutoloadClasses'] ) ) {
57 AutoLoader::registerClasses( $vars[
'wgAutoloadClasses'] );
61 if ( !isset( $extInfo[
'autoloaderPaths'] )
62 || !isset( $extInfo[
'autoloaderClasses'] )
63 || !isset( $extInfo[
'autoloaderNS'] )
67 throw new LogicException(
'Missing autoloader keys from extracted extension info' );
69 AutoLoader::loadFiles( $extInfo[
'autoloaderPaths'] );
70 AutoLoader::registerClasses( $extInfo[
'autoloaderClasses'] );
71 AutoLoader::registerNamespaces( $extInfo[
'autoloaderNS'] );
73 $legacyHooks = $legacySchemaHooks ? [
'LoadExtensionSchemaUpdates' => $legacySchemaHooks ] : [];
77 new StaticHookRegistry(
79 $extInfo[
'attributes'][
'Hooks'] ?? [],
80 $extInfo[
'attributes'][
'DeprecatedHooks'] ?? []
85 $this->
getContext()->provide(
'VirtualDomains',
86 $extInfo[
'attributes'][
'DatabaseVirtualDomains'] ?? [] );
88 $this->
getContext()->provide(
'ExtensionTaskSpecs', [] );
89 return Status::newGood();