This is the development version for the new mwstake.org/wiki.
Project "Boterhal Extensions Best Practices Index (Boterhal Index)"
Project "Extension Templates"
Jump to navigation
Jump to search
Identify well maintained and relevant extensions that implement functionality in an optimal way.
|
In this context
|
- Well maintained
- recommended for latest LTS
- relevant
- {{Used by }}
- optimal
- TDM, code quality: standards, unti, JS, integration tests, visual regression tests, Linting PHP stan, enforced by CI, release cycle following semantic versioning
What is the service provided to the community?
A developer should be able to install Extension:BoilerPlate and have exemplary extension functionalities working "out of the box". This shall:
- simplify understanding how the functionalities are implemented, configured and used ("the truth is in the code") and
- implicitly insinuate best practices.
Functionalities that can be implemented in MediaWiki extensions
This is partly based on the official types of extensions.
Functionality | How to debug |
---|---|
Functionality "MediaWiki Action API" |
Pending |
Functionality "MediaWiki Job Queue" |
|
Functionality "MediaWiki MCR" |
Pending |
- Front end (HTML, Javascript C1703127635 Issue, CSS, other) Manual:OutputPage.php
- Magic word
{{BoilerPlateMagicWord}}
- Tag
<BoilerPlateTag>
- Parser function
{{BoilerPlateParserFunction|...}})
- Hooks
- Special page
- Page content model
- PHP unit tests
- PHP integration tests
- Cypress unit tests C2001997125
- Cypress e2e/integration tests
- Extension-specific logging
- Database tables
- Forms
- Permissions
- Rest
- Action
- Subpages
- List MyPage's sub pages:
{{Special:PrefixIndex/MyPage/}}
- List MyPage's sub pages:
Install Extension:BoilerPlate
Method: clone from Git | Method: register in composer.local.json |
---|---|
|
|
Configure
# w/LocalSettings.php
wfLoadExtension( 'BoilerPlate' );
$wgBoilerPlateExampleGlobalVariable = "my BoilerPlate example global variable";
$wgDebugLogGroups['boilerPlate'] = "/var/log/boilerPlate.log";
php maintenance/update.php
Explore BoilerPlate functionality on your wiki in the browser, the console, the CLI and the code
https://your.wiki/wiki/Special:BoilerPlate
https://your.wiki/wiki/BoilerPlate
{{BoilerPlateMagicWord}}
<BoilerPlateTag>
{{BoilerPlateParserFunction|BPPFPositionalArgument|BPPFNamedArgument=BPPFNA}}
extensions/BoilerPlate/src/BoilerPlateHooks.php
extensions/BoilerPlate/extension.json
>
{
"AutoloadNamespaces": {
"MediaWiki\\Extension\\BoilerPlate\\": "src/"
},
"SpecialPages": {
"BoilerPlate": "SpecialBoilerPlate"
},
"AutoloadClasses": {
"SpecialBoilerPlate": "includes/specials/SpecialBoilerPlate.php"
},
"HookHandlers": {
"chooseSomeName": {
"class": "MediaWiki\\Extension\\BoilerPlate\\Hooks"
}
},
"Hooks": {
"BeforePageDisplay": "chooseSomeName"
},
"ResourceModules": {
"ext.boilerPlate": {
"localBasePath": "resources/ext.boilerPlate",
"remoteExtPath": "BoilerPlate/resources/ext.boilerPlate",
"dependencies": [],
"styles": ["boilerPlate.css"],
"packageFiles": [
"./boilerPlate.js"
],
"messages": []
}
},
"JobClasses": {
"BoilerPlateJob": "MediaWiki\\Extension\\BoilerPlate\\BoilerPlateJob"
},
}
extensions/BoilerPlate/tests/phpunit/unit/BoilerPlateHooksTest.php
php tests/phpunit/phpunit.php extensions/BoilerPlate/tests/phpunit/unit/BoilerPlateHooksTest.php
Class 'Wikimedia\TestingAccessWrapper' not found Issue