Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/282069

Change subject: Load extra autload files before executing callbacks
......................................................................

Load extra autload files before executing callbacks

Callbacks should be able to safely assume that anything (or at least mostly)
defined in extension registration is already loaded and processed when
the callback itself is executed. To make sure, that this applies, callbacks
should be executed after all extra autoload paths are loaded.

Bug: T131978
Change-Id: I2c6624423957a8a00523b126fa7209d9c283aa9e
---
M includes/registration/ExtensionRegistry.php
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/282069/1

diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index 33395f7..2659f94 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -274,12 +274,11 @@
                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 );
-               }
-
-               foreach ( $info['autoloaderPaths'] as $path ) {
-                       require_once $path;
                }
 
                $this->loaded += $info['credits'];

-- 
To view, visit https://gerrit.wikimedia.org/r/282069
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c6624423957a8a00523b126fa7209d9c283aa9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to