X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fregistration%2FExtensionRegistry.php;h=0eb6a9bb7fae76583ae0f7e955e2c055bca7fcf4;hp=18766453999873194985d2f44835ce73f87c8c15;hb=ebe895d0398d2ec0a27440a87545773ae2b22f92;hpb=0c2687f44eb0e8c7f480b7303f89056682ba0bfb diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 1876645399..0eb6a9bb7f 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -202,6 +202,7 @@ class ExtensionRegistry { * @param array $queue keys are filenames, values are ignored * @return array extracted info * @throws Exception + * @throws ExtensionDependencyError */ public function readFromQueue( array $queue ) { global $wgVersion; @@ -245,6 +246,7 @@ class ExtensionRegistry { } if ( isset( $info['AutoloadNamespaces'] ) ) { $autoloadNamespaces += $this->processAutoLoader( $dir, $info['AutoloadNamespaces'] ); + AutoLoader::$psr4Namespaces += $autoloadNamespaces; } // get all requirements/dependencies for this extension @@ -273,11 +275,7 @@ class ExtensionRegistry { ); if ( $incompatible ) { - if ( count( $incompatible ) === 1 ) { - throw new Exception( $incompatible[0] ); - } else { - throw new Exception( implode( "\n", $incompatible ) ); - } + throw new ExtensionDependencyError( $incompatible ); } // Need to set this so we can += to it later