professional-wiki / page-approvals
Quality control for MediaWiki. Approve pages, assign approvers to categories, view your approval requests, and see the approval status of pages.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 1
Open Issues: 8
Type:mediawiki-extension
Requires
- php: >=8.1
- composer/installers: ^2|^1.0.1
Requires (Dev)
- jeroen/psr-log-test-doubles: ^3.2.0
- mediawiki/mediawiki-codesniffer: ^43.0.0
- phpstan/phpstan: ^1.11.4
- vimeo/psalm: ^5.24.0
This package is auto-updated.
Last update: 2024-11-07 12:09:28 UTC
README
Quality control for your wiki. Mark pages as approved or request review from approvers. Read more in the Page Approvals documentation.
Table of Contents
Professional Wiki created this extension and provides MediaWiki Development, MediaWiki Hosting, and MediaWiki Consulting services.
Usage Documentation
See the Page Approvals usage documentation.
Installation
Platform requirements:
The recommended way to install the Page Approvals extension is with Composer and MediaWiki's built-in support for Composer.
On the commandline, go to your wikis root directory. Then run these two commands:
COMPOSER=composer.local.json composer require --no-update professional-wiki/page-approvals:~1.0
composer update professional-wiki/page-approvals --no-dev -o
Then enable the extension by adding the following to the bottom of your wikis LocalSettings.php file:
wfLoadExtension( 'PageApprovals' );
You can verify the extension was enabled successfully by opening your wikis Special:Version page.
PHP Configuration
Configuration can be changed via LocalSettings.php.
See the Page Approvals configuration reference.
Development
Run composer install
in extensions/PageApprovals/
to make the code quality tools available.
Running Tests and CI Checks
You can use the Makefile
by running make commands in the PageApprovals
directory.
make ci
: Run everythingmake test
: Run all testsmake phpunit --filter FooBar
: run only PHPUnit tests with FooBar in their namemake phpcs
: Run all style checksmake cs
: Run all style checks and static analysismake lint-docker
: Run all JavaScript and CSS linting
Updating Baseline Files
Sometimes Psalm and PHPStan generate errors or warnings we do not wish to fix.
These can be ignored by adding them to the respective baseline file. You can update
these files with make stan-baseline
and make psalm-baseline
.
Inserting Test Data
INSERT INTO approver_config (ac_user_id, ac_categories) VALUES (1, 'TestCat|TestCat2');
Release Notes
Version 1.0.0 - 2024-10-28
- Approval UI on regular wiki pages that shows the approval status and allows approvers to change said status
- API endpoints to approve and unapprove pages
- Automatic unapproval of pages when their displayed content changes
- Detection of changes to displayed content via embedded constructs such as templates or SMW queries
- Approver management page and associated MediaWiki right (Special:ManageApprovers)
- Personalized list of pending approvals (Special:PendingApprovals)
- Compatibility with MediaWiki 1.39 up to 1.43-dev
- Compatibility with PHP 8.1 up to 8.3