For a long time Wikibase has been a bit of a "special" extension, as it really contains 2 other extensions (or 3 or more at times) and none of these extensions follow the standard practices for extensions.
Namely
1) Be loadable via `wfLoadExtension( 'EXTENSIONNAME' )`
2) Have default configuration that works out of the box
This ends up being confusing for anyone that works on or around or uses Wikibase, and results in overheads for standard systems such as Wikimedia extension CI which needs special cases for Wikibase., and an confusing entry point at `Wikibase.php` [link](https://github.com/wikimedia/Wikibase/blob/master/Wikibase.php)
This task would that theCurrently the documented way for loading Wikibase is:
```lang=php
wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
```
This task has goals of:
- Provide a default experience that would be loaded with `wfLoadExtension( 'Wikibase' )`, likely with both repo and client loaded
- Continue to allow the individual extensions to be loaded in their current way, maintaining back compatibility.
- Load sensible defaults for Wikibase in all of these situations. (Probably the things in the relevant `ExampleSettings` files)
**OLD 2015 ticket description**Acceptance Criteria: 🏕️🌟(September 2021)**
[] Users of Wikibase can load the extension (Repo & Client) using a single call to `wfLoadExtension( 'Wikibase' )`
[] Existing extension entry points can still be used and do not change behaviour
Copy some of the reasonable assumptions from repo/config/Wikibase.example.php to repo/config/Wikibase.default.php, and also for the client settings. For example, $wgWBRepoSettings["entityNamespaces"] should default to the registered WB_NS_ITEM namespace and so on...------------
Fix any code that will not run without customized configura**OLD 2015 ticket description.**
Also, as suggested in the TODO at the end of > Copy some of the reasonable assumptions from repo/config/Wikibase.example.php to repo/config/Wikibasee.default.php, the default mode should be to require both the repo andand also for the client entry pointssettings. It's not nice that the traditional incantation throws a fatal "Incomplete configuration" error,For example, $wgWBRepoSettings["entityNamespaces"] should default to the registered WB_NS_ITEM namespace and so on...
require_once "$IP/extensions/Wikibase/Wikibase.php";>
> Fix any code that will not run without customized configuration.
>
> Also, as suggested in the TODO at the end of Wikibase.php, the default mode should be to require both the repo and client entry points. It's not nice that the traditional incantation throws a fatal "Incomplete configuration" error,
> require_once "$IP/extensions/Wikibase/Wikibase.php";