User:Mainframe98/Notes
Appearance
This page contains notes about MediaWiki I collect(ed) during my journeys while working with or on the software.
- TODO: There's more where this came from
Deleting
[edit]- Using ?action=delete will remove the whole page; it's translations and the translation units.
Notes
[edit]- Flags --dbuser and --dbpass(file) work for general installing. They will result in the accompanying values finding themselves a nice and snug place in LocalSettings.php.
- So do flags --installdbuser and --installdbpass(file), but their values don't end up in LocalSettings.php.
- In case both are set, undocumented behavior appears: the values for --dbuser and --dbpass(file) are used by the installer to create a new account with those credentials, using the installdbuser and installdbpass credentials during the installation.
- However, this does not happen if both values are equal to each other.
- Enabling the Echo and Flow role also installs CentralAuth and some other extensions but does not enable that role.
- In the rare case that an enabled role has composer dependencies that have been installed are not loaded, rebooting the vagrant virtual machine with vagrant reload can resolve the issue.
Debugging MediaWiki maintenance scripts run on MediaWiki-Vagrant with PhpStorm
[edit]- This is an absolute pain.
- Ensure you've correctly setup PhpStorm to detect Vagrant.
- Setup a PHP Script in the Run/Debug Configurations screen, which can be reached by clicking Run > Edit Configurations...
- The script file MUST be MWScript.php! Maintenance scripts will not work otherwise.
- Add the path to the script as you'd have done with MWScript regularly as the first argument
- Comment out the security check in MWScript.php
Running unit tests
[edit]- Whenever an error message related to TestUser.php is shown (before it can run any tests), then this could be caused by
$wgActorTableSchemaMigrationStage
, whenever it is set to anything higher thanMIGRATION_WRITE_BOTH
.
Running unit tests for Code sniffer
[edit]Which is a pain on Windows. However, you can get it to run (with the usual line ending failures) by removing the $PHPUNIT_ARGS from composer.json.
To run an individual sniff test, you'll have to run vendor/bin/phpunit -c ./ --filter MediaWikiStandardTest::testFile@SNIFF_NAME.php. Replace testFile with testFix to test the autofix.
Creating a new project
[edit]- Think extension, library, skin or what have you.
- Request a gerrit repository: Gerrit/New repositories/Requests.
- Request a project on Phabricator: https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=Project-Admins
- Add CI, depending on your needs:
- (optional) Add i18n support from Translatewiki.net: Gerrit/L10n-bot