Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul the extension, release version 1.1.0 [SEL-1057] #7

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

DanielWTQ
Copy link
Contributor

  • Support and require 1.39+
  • Add linting and Phan
  • Drop estahn/phpunit-json-assertions test dependency
  • Drop a whole bunch of unneeded parts
  • Convert the PagePort class to a service
  • Add support for non-wikitext content
  • Declare version 1.1.0 of the extension
  • Add myself as a co-author

* Require MediaWiki 1.39+ and run CI against 1.39

* Drop use of `estahn/phpunit-json-assertions` - while our test action does
merge dev dependencies, MediaWiki generally doesn't - instead, implement the
validation of the JSON against the schema using the available
`justinrainbow/json-schema` library

* Update `PagePortTest` to extend `MediaWikiIntegrationTestCase`;
`MediaWikiTestCase` was dropped in 1.38, see `bf56204` in core

* Update `PagePort` to use `WikiPage::doUserEditContent()`, `::doEditContent()`
was dropped in 1.39, see `0e39420` in core

* Update `PagePort` to use `IResultWrapper::fetchRow()` and `::free()`; the
corresponding methods `::fetchRow()` and `::freeResult()` were removed from the
IDatabase interface in 1.39, see `46374a8` in core

* Update `PagePort` to use the `NamespaceInfo` service; the `MWNamespace` class
was removed in 1.39, see `ea1c106` in core

* Update `PagePort` to use `WikiPage::doDeleteArticleReal()`;
`::doDeleteArticle()` was dropped in 1.36, see `7cffa71` in core

* Add tests for `PagePort::getAllPages()` and `::delete()`
* Add git attributes

* CI: run phan and make pass: drop redundant conditions, use `?:` syntax, fix
documentation, and iterate through result sets

* CI: run phpcs and make pass; most notably, drop fallback to `$wgContLang`
when the content language service is not available; it has been available since
1.32, see `1e07965` in core

* Remove unneeded files and extension.json entries:

** Since 1.28 tests have been automatically discovered under the
`tests/phpunit/` directory, see `1d7221d` in core. Accordingly, drop the
handling of the `UnitTestsList` hook.

** Nothing in this extension needs aliases defined, and the aliases currently
defined are unused. Accordingly, drop the extension aliases file.

** This extension has no ResourceLoader modules or other files that would be
linted by NPM tools. Accordingly, delete the eslint and stylelint
configurations, and the gruntfile and package.json configurations. Also remove
the unused ResourceLoader-related entries from extension.json.

** Remove unused and incorrect `.gitreview` which seems to have been copied
from CentralAuth.

** Remove empty `config` entry from extension.json.

* Convert PagePort to a service.

* Drop `PagePort::getAllCategories()` and replace its caller with a simpler
check,
1.1 since there are no breaking changes
Also add myself as an author given how much I refactored
@DanielWTQ DanielWTQ requested a review from vedmaka August 13, 2024 06:53
@vedmaka vedmaka merged commit a6b800c into master Aug 15, 2024
4 checks passed
@DanielWTQ DanielWTQ deleted the modernize branch August 15, 2024 19:48
@vedmaka vedmaka changed the title Overhaul the extension, release version 1.1.0 Overhaul the extension, release version 1.1.0 [SEL-1057] Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants