Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/282168
Change subject: Fix composer in extension registration ...................................................................... Fix composer in extension registration Load composers vendor/autoload.php file before AutoloadClasses otherwise it will fail because some classes may require something from the packages. See error at https://travis-ci.org/JeroenDeDauw/Maps/jobs/121311553 But if i add vendor/autoload.php to top of php main file then it works. Using just composer from extension.json to load it results in that error in the above link. Bug: T131978 Change-Id: Ifd52ae264a15e26a43e85b4c53f4043d09cc2d89 --- M includes/registration/ExtensionRegistry.php 1 file changed, 11 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/282168/1 diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index dc53ca4..714195a 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -194,6 +194,9 @@ if ( $version < self::OLDEST_MANIFEST_VERSION || $version > self::MANIFEST_VERSION ) { throw new Exception( "$path: unsupported manifest_version: {$version}" ); } + // Get extra paths for later inclusion + $autoloaderPaths = array_merge( $autoloaderPaths, + $processor->getExtraAutoloaderPaths( dirname( $path ), $info ) ); $autoload = $this->processAutoLoader( dirname( $path ), $info ); // Set up the autoloader now so custom processors will work $GLOBALS['wgAutoloadClasses'] += $autoload; @@ -209,9 +212,6 @@ . '.'; continue; } - // Get extra paths for later inclusion - $autoloaderPaths = array_merge( $autoloaderPaths, - $processor->getExtraAutoloaderPaths( dirname( $path ), $info ) ); // Compatible, read and extract info $processor->extractInfo( $path, $info, $version ); } @@ -231,6 +231,14 @@ } protected function exportExtractedData( array $info ) { + foreach ( $info['defines'] as $name => $val ) { + define( $name, $val ); + } + + foreach ( $info['autoloaderPaths'] as $path ) { + require_once $path; + } + foreach ( $info['globals'] as $key => $val ) { // If a merge strategy is set, read it and remove it from the value // so it doesn't accidentally end up getting set. @@ -271,12 +279,6 @@ } } - foreach ( $info['defines'] as $name => $val ) { - define( $name, $val ); - } - foreach ( $info['autoloaderPaths'] as $path ) { - require_once $path; - } foreach ( $info['callbacks'] as $cb ) { call_user_func( $cb ); } -- To view, visit https://gerrit.wikimedia.org/r/282168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd52ae264a15e26a43e85b4c53f4043d09cc2d89 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Paladox <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
