Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / includes / registration / ExtensionRegistry.php
index 33395f7..35044e1 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * ExtensionRegistry class
  *
@@ -19,7 +21,7 @@ class ExtensionRegistry {
        /**
         * Version of the highest supported manifest version
         */
-       const MANIFEST_VERSION = 1;
+       const MANIFEST_VERSION = 2;
 
        /**
         * Version of the oldest supported manifest version
@@ -86,7 +88,7 @@ class ExtensionRegistry {
                // we don't want to fail here if $wgObjectCaches is not configured
                // properly for APC setup
                try {
-                       $this->cache = ObjectCache::getLocalServerInstance();
+                       $this->cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                } catch ( MWException $e ) {
                        $this->cache = new EmptyBagOStuff();
                }
@@ -274,13 +276,12 @@ class ExtensionRegistry {
                foreach ( $info['defines'] as $name => $val ) {
                        define( $name, $val );
                }
-               foreach ( $info['callbacks'] as $cb ) {
-                       call_user_func( $cb );
-               }
-
                foreach ( $info['autoloaderPaths'] as $path ) {
                        require_once $path;
                }
+               foreach ( $info['callbacks'] as $cb ) {
+                       call_user_func( $cb );
+               }
 
                $this->loaded += $info['credits'];
                if ( $info['attributes'] ) {