Lucas Werkmeister (WMDE) has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/392414 )
Change subject: Also autoload client class in repo outside of tests
......................................................................
Also autoload client class in repo outside of tests
TitleFactory is used in repo’s own code, not just in the tests, so we
should still make sure the client class is loaded even outside the
tests. This is necessary on repo wikis with client functionality
disabled. (This fixes Icb197448fc, which in turn fixes Ic3c3f2b969.)
Change-Id: Ie5f7e6195facd4b7bc6521f48fc9c756474f8002
---
M repo/Wikibase.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/14/392414/1
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 22f3177..a4969d5 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -73,8 +73,8 @@
// Load autoload info as long as extension classes are not PSR-4-autoloaded
require_once __DIR__ . '/autoload.php';
-// Nasty hack: some repo's tests rely on classes defined in Client! Load it in
repo-only mode to have tests pass
-if ( !defined( 'WBC_VERSION' ) && defined( 'MW_PHPUNIT_TEST' ) ) {
+// Nasty hack: part of repo relies on classes defined in Client! load it if in
repo-only mode
+if ( !defined( 'WBC_VERSION' ) ) {
global $wgAutoloadClasses;
$wgAutoloadClasses['Wikibase\\Client\\Store\\TitleFactory'] = __DIR__ .
'/../client/includes/Store/TitleFactory.php';
}
--
To view, visit https://gerrit.wikimedia.org/r/392414
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5f7e6195facd4b7bc6521f48fc9c756474f8002
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits