MediaWiki-Docker/Extension/Math
This page instructs you to install Extension:Math inside MediaWiki-Docker.
Follow the Quickstart instructions at MediaWiki-Docker page. Once MediaWiki is running and available at http://localhost:8080
, then continue with instructions on this page.
All commands should be run in the directory where you installed MediaWiki. All mentioned files are also located there.
Clone the repository and its dependencies
editgit clone "https://gerrit.wikimedia.org/r/mediawiki/skins/Vector" skins/Vector
git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/Math" extensions/Math
Modify LocalSettings.php
editIf not already there, add this to the end of LocalSettings.php
.
wfLoadSkin( 'Vector' );
wfLoadExtension( 'Math' );
Run maintenance scripts
editdocker compose exec mediawiki composer update
docker compose exec mediawiki php maintenance/run.php update.php
Run test
editdocker compose exec mediawiki composer phpunit:entrypoint -- ./extensions/Math/tests/phpunit/
Download more test data
docker compose exec mediawiki /bin/bash -c 'cd /var/www/html/w/extensions/Math/maintenance && ./downloadMoreTexVCtests.sh'
Check and fix linting
editdocker compose exec -w /var/www/html/w/extensions/Math mediawiki composer fix
docker compose exec -w /var/www/html/w/extensions/Math mediawiki composer test
Phan
editdocker compose exec -w /var/www/html/w/extensions/Math mediawiki php vendor/bin/phan -d . --long-progress-bar
Code coverage report
editdocker compose exec -e mediawiki php -dpcov.enabled=1 -dpcov.directory=/var/www/html/w/extensions/Math -d 'pcov.exclude=@(tests|vendor)@' vendor/bin/phpunit -c tests/phpunit/suite.xml ./extensions/Math/tests/phpunit/ --coverage-html ./extensions/Math/tests/coverage --whitelist /var/www/html/w/extensions/Math