Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register connection providers early, refs 4170 #4195

Merged
merged 1 commit into from
Aug 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public static function checkExtensionRegistration( &$vars ) {
*/
public static function initExtension( &$vars ) {
Hooks::registerEarly( $vars );

// Register connection providers early to ensure the invocation of SMW
// related extensions such as `wfLoadExtension( 'SemanticCite' );` can
// happen before or after `enableSemantics` so that the check by the
// `ConnectionManager` (#4170) doesn't throw an error when an extension
// access the `Store` during `onExtensionFunction`
self::initConnectionProviders();
}

/**
Expand Down Expand Up @@ -88,8 +95,6 @@ public function init( &$vars, $localDirectory ) {
CompatibilityMode::disableSemantics();
}

$this->initConnectionProviders( );

$this->registerJobClasses( $vars );
$this->registerPermissions( $vars );

Expand Down Expand Up @@ -119,7 +124,7 @@ private function addDefaultConfigurations( &$vars ) {
}
}

private function initConnectionProviders() {
private static function initConnectionProviders() {

$applicationFactory = ApplicationFactory::getInstance();

Expand Down